What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-20 19:30:21
strapi.io react
import React from 'react'; // Parses the JSON returned by a network request const parseJSON = resp => (resp.json ? resp.json() : resp); // Checks if a network request came back fine, and throws an error if not const checkStatus = resp => { if (r... Add solution -
Javascript 2021-09-09 07:55:02
react setstate in another component
// myContainer.js import React, { useState } from 'react' import MyChild from 'some/path/myChild' function MyContainer() { const [name, setName] = useState('foo') return ( <MyChild name={name} onNameChange={setName} /> ) } export defaul... Add solution -
Javascript 2021-09-02 15:50:02
create dynamic fields in react
import React, { useState } from "react"; function App() { const [inputList, setInputList] = useState([{ firstName: "", lastName: "" }]); // handle input change const handleInputChange = (e, index) => { const { ... Add solution
Best helpers
NeuronQ
+5
JoshuaFicy
+5
Peacetype
+5
Majte
+5
Darman
+5
Entrepreneur
+5
Meital Regev
+5
Shenkwen
+5
Digcoal
+5
Arad
+5
A G Davey
+5
Dustin G
+5
Spork
+5
Hell.Bent
+5
Emmet
+5
KJ11
+5
Muazam
+5
Zijoud
+5
Vigrond
+5
Scoiattolo
+5
Erica Price
+5