install hooks react code example
Example 1: react hook install
npm i -S react@16.7.0-alpha.2 react-dom@16.7.0-alpha.2
Example 2: react hooks npm install
npm install @apollo/react-hooks
Example 3: React Hook "useState" is called in function "app" which is neither a React function component or a custom React Hook function react-hooks/rules-of-hooks
const App = props => {...}
export default App;
Example 4: how to use hooks react
const App = () => {
const [students , setStudents] = useState([]);
return (
)
}