Skip to content

Instantly share code, notes, and snippets.

View buddycoder-cpu's full-sized avatar

buddycoder-cpu

  • Joined Oct 5, 2025
View GitHub Profile
const books = [
{
id: '1',
title: 'Harry Potter',
author: 'J.K. Rowling',
imageUrl: 'https://upload.wikimedia.org/wikipedia/en/6/6b/Harry_Potter_and_the_Philosopher%27s_Stone_Book_Cover.jpg',
},
{
id: '2',
title: 'The Hobbit',
import React from "react";
import { View, Text, ScrollView, Pressable, StyleSheet, Alert } from "react-native";
const products = [
{ id: 1, name: "Apple", price: 1 },
{ id: 2, name: "Banana", price: 2 },
{ id: 3, name: "Orange", price: 3 },
{ id: 4, name: "Grapes", price: 4 },
{ id: 5, name: "Mango", price: 5 },
];
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F5F5F5',
},
listContent: {
padding: 16,
},
card: {
backgroundColor: '#fff',
const animalsData = [
{
id: '1',
name: 'Lion',
imageUrl: 'https://images.unsplash.com/photo-1546182990-dffeafbe841d?w=400',
description: 'Known as the king of the jungle, lions are powerful carnivores that live in prides across African savannas.'
},
{
id: '2',
name: 'Elephant',
import React from 'react';
import { FlatList, Image, StyleSheet, Text, View, TouchableOpacity, Alert, Platform, } from 'react-native';
import { SafeAreaView, SafeAreaProvider } from 'react-native-safe-area-context';
import animalsData from '../constants/Data';
const AnimalList = () => {
const handlePress = (item) => {
const message = `You clicked on "${item.name}"`;
Platform.OS === 'web'
? window.alert(message)
@buddycoder-cpu
buddycoder-cpu / Color.js
Created October 7, 2025 09:46
React-Native-Course
export const Colors = {
primary: "#6849a7",
warning: "#cc475a",
dark: {
text: "#d4d4d4",
title: "#fff",
background: "#252231",
navBackground: "#201e2b",
iconColor: "#9591a5",