Skip to content

Instantly share code, notes, and snippets.

View alic-xc's full-sized avatar
🎯
Flexin

Olamilekan Alade alic-xc

🎯
Flexin
View GitHub Profile
import React from "react";
import { View, SafeAreaView, StyleSheet } from "react-native";
interface AuthProps {
header?: React.ReactNode;
formContent?: React.ReactNode;
}
const AuthBackground = (props: AuthProps) => {
return (
@alic-xc
alic-xc / main.js
Created November 11, 2023 17:02
Update stories in module.exports
module.exports = {
stories: [
"./stories/**/*.stories.?(ts|tsx|js|jsx)",
"../src/stories/*.stories.?(ts|tsx|js|jsx)",
],
addons: [
"@storybook/addon-ondevice-controls",
"@storybook/addon-ondevice-actions",
],
};
@alic-xc
alic-xc / terminal
Created October 26, 2023 21:54
Start storybook
npx expo start
export {default} from './.storybook';
@alic-xc
alic-xc / storybook-installation.tsx
Created October 21, 2023 15:58
Storybook installation
npm i @storybook/react-native
npx sb init --type react_native
@alic-xc
alic-xc / installation.tsx
Last active October 21, 2023 14:59
Expo Installation
npx create-expo-app --template
@alic-xc
alic-xc / App.jsx
Created October 14, 2023 21:09
Resource.tsx
import React, {useMemo} from "react"
const App = () => {
const [users, setUsers] = React.useState([])
return (
<div></div>
)
}
@alic-xc
alic-xc / index.jsx
Created October 14, 2023 20:15
useMemo Example
import React, { useMemo } from "react";
const App = () => {
const [counter, setCounter] = React.useState(0)
return (
<div>
<button onClick={() => setCount(prevState => prevState + 1)>Click Me<button>
<span>{counter}</span>
class VehicleSerializer(serializers.ModelSerializer):
image = Base64ImageField(required=True)
class Meta:
model = Vehicle
fields = '__all__'
class Vehicle(models.Model):
....
image = models.ImageField(upload_to="vehicle")
....