What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-01 20:21:03
react forms
import React from "react"; import { useForm, Controller } from "react-hook-form"; import Select from "react-select"; import Input from "@material-ui/core/Input"; import { Input as InputField } from "antd";... Add solution -
Javascript 2021-09-30 05:30:02
Simple form based react material ui
import React from 'react' import { Field, reduxForm } from 'redux-form' import TextField from '@material-ui/core/TextField' import Checkbox from '@material-ui/core/Checkbox' import FormControlLabel from '@material-ui/core/FormControlLabel' import FormCont... Add solution -
Javascript 2021-09-29 08:54:04
validator max e min redux form
import React from 'react' import { Field, reduxForm } from 'redux-form' const required = value => (value || typeof value === 'number' ? undefined : 'Required') const maxLength = max => value => value && value.length > max ? `Must be... Add solution -
Javascript 2021-09-29 04:48:03
how to clear state in react hooks
const { useState } = React; function signupUser() { return new Promise(resolve => { setTimeout(resolve, 1000); }); } const initialState = { username: "", email: "", password: "", passwordConfirmation: &qu... Add solution -
Javascript 2021-09-28 02:07:02
Autocomplete an Address with a React hook Form
import React from "react"; import { useForm } from "react-hook-form"; export default function App() { const { register, handleSubmit, errors } = useForm(); const onSubmit = data => console.log(data); return ( <form on... Add solution -
Other 2021-09-24 11:06:03
changing color dynamically in next js tailwind css
import { useState } from 'react'; import Image from 'next/image'; const NavItem = props =>( <li> <a className="text-md font-bold text-gray-700 px-2 py-1 hover:bg-gray-300 rounded transition-colors duration-300" href={prop... Add solution -
Javascript 2021-09-20 15:49:02
lift state up react
import React from "react"; export default function App() { const [todos, setTodos] = React.useState(["item 1", "item 2", "item 3"]); return ( <> <TodoCount todos={todos} /> <Todo... Add solution -
Javascript 2021-09-19 17:22:05
send multipart form data axios with node js
import React from 'react' import axios, { post } from 'axios'; class SimpleReactFileUpload extends React.Component { constructor(props) { super(props); this.state ={ file:null } this.onFormSubmit = this.onFormSubmit.bind(this) ... Add solution
Best helpers
Andrew Lowe
+5
Thruston
+5
Tralston
+5
Silver Rain
+5
Mahnaz
+5
JohnDoe
+5
Akiman Barwa
+5
Jeff Ava
+5