React Hooks Simples React Hooks Simples
|
useState
|
const [count, setCount] = useState(0); |
|
useReducer
|
const [todos, dispatch] = useReducer(todosReducer); |
|
useFriendStatus
|
const isOnline = useFriendStatus(props.friend.id); |
toast('Hello World'); |
|
toast.success('Successfully created!'); |
|
toast.error('This is an error!'); |
|
toast.custom(<div>Hello World</div>); |
|
toast.loading('Waiting...'); |
|
` |
<Toaster position="top-center" reverseOrder={false} gutter={8} containerClassName="" containerStyle={{}} toastOptions={{ // Define default options className: '', duration: 5000, style: { background: '#363636', color: '#fff', }, // Default options for specific types success: { duration: 3000, theme: { primary: 'green', secondary: 'black', }, }, }} /> |
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.