What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-15 04:05:20
// React Cache for simple data fetching (not final API)
// React Cache for simple data fetching (not final API) import {unstable_createResource} from 'react-cache'; // Tell React Cache how to fetch your data const TodoResource = unstable_createResource(fetchTodo); function Todo(props) { // Suspends until t... Add solution -
Javascript 2021-11-07 14:54:17
how to setup tailwind for reactjs
1. npx create-react-app . 2. npm i -D tailwindcss postcss-cli autoprefixer or npm install tailwindcss@latest postcss@latest autoprefixer@latest //postcss - transform our compile css // autoprefixer - set vendor prefixes within our css automatically whe... Add solution -
Html 2021-10-25 15:08:06
reacrt StrictMode
<React.StrictMode> <div> <ComponentOne /> <ComponentTwo /> </div> </React.StrictMode> // React's StrictMode is sort of a helper component that will help you write better react components, you can wrap a set... Add solution -
TypeScript 2021-10-05 09:16:05
s3 redirect all requests to index.html
It's very easy to solve it without url hacks, with CloudFront help. Create S3 bucket, for example: react Create CloudFront distributions with these settings: Default Root Object: index.html Origin Domain Name: S3 bucket domain, for example: react.s3.amaz... Add solution -
Javascript 2021-10-03 09:55:03
reactjs basic example
// -------// -------// ------- // index.js // -------// -------// ------- const user = { name: "zidane", email: '[email protected]' }; const element = <h1> {user.name} exist email: {user.email} </h1>; const element2 = <... Add solution -
Javascript 2021-09-01 07:28:02
tailwind react
1. npx create-react-app . 2. npm i -D tailwindcss postcss-cli autoprefixer or npm install tailwindcss@latest postcss@latest autoprefixer@latest //postcss - transform our compile css // autoprefixer - set vendor prefixes within our css automatically whe... Add solution -
Javascript 2021-08-29 15:41:02
react strict mode
<React.StrictMode> <div> <ComponentOne /> <ComponentTwo /> </div> </React.StrictMode> // React's StrictMode is sort of a helper component that will help you write better react components, you can wrap a set... Add solution -
Javascript 2021-08-29 09:26:02
semantic ui react modal
import React from 'react' import { Button, Header, Image, Modal } from 'semantic-ui-react' function ModalExampleModal() { const [open, setOpen] = React.useState(false) return ( <Modal onClose={() => setOpen(false)} onOpen={() =... Add solution