What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-19 10:51:40
Dialog using Reach
function Example(props) { const [showDialog, setShowDialog] = React.useState(false); const open = () => setShowDialog(true); const close = () => setShowDialog(false); return ( <div> <button onClick={open}>Open Dialog</but... Add solution -
Javascript 2021-11-19 04:43:19
react hooks
const [state, setState] = useState(initialState); Add solution -
Javascript 2021-11-17 18:06:10
React useState hook
import React, { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call "count" const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> ... Add solution -
Javascript 2021-11-16 22:18:12
usestate in react
import React, { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call "count" const [count, setCount] = useState(0); return ( <div> <p>You clicked {count} times</p> ... Add solution -
Javascript 2021-11-16 21:11:13
react native socket io
import React, { useState, useEffect } from "react"; import socketIOClient from "socket.io-client"; const ENDPOINT = "http://127.0.0.1:4001"; function App() { const [response, setResponse] = useState(""); useEf... Add solution -
Javascript 2021-11-15 22:07:21
how to create dynamic classes in tailwind typescript react
const classes = { wrapper: 'border-2 m-16 p-16 text-center', title: 'text-gray-800 text-xl font-bold', description: (active) => `my-6 ${active ? 'text-red-900 font-medium' : 'text-gray-800'}`, button: 'py-2 px-4 bg-gray-100 border-2 focus:o... Add solution -
Javascript 2021-11-14 17:55:12
Switch React Native Paper
import { Switch } from 'react-native-paper'; const MyComponent = () => { const [isSwitchOn, setIsSwitchOn] = React.useState(false); const onToggleSwitch = () => setIsSwitchOn(!isSwitchOn); return <Switch value={isSwitchOn} onValueChange=... Add solution