DEV Community

Discussion on: Basic Hooks in React

Collapse
 
pcockerell profile image
Peter Cockerell

In the very first code example you write

const [state, initialState] = useState(initialState);

I think you meant

const [state, setState] = useState(initialState);