Closed tyriem closed 3 years ago
you cannot create a state variable like this... it should be
const [ classArray, setClassArray] = React.useState();
see completed example here - https://stackblitz.com/edit/react-zwomkm?file=src/ListDisplay.js
you cannot create a state variable like this... it should be
const [ classArray, setClassArray] = React.useState();
see completed example here - https://stackblitz.com/edit/react-zwomkm?file=src/ListDisplay.js
Understood, will correct and revert. Thank you for your suggested solution.
Solution implemented as per suggestion and condensed to singular .TSX
https://github.com/tyriem/REACT/blob/8997951a7682f9601a0dfaa4e5c126d91e92094c/app/src/Intro%20to%20REACTJS%2017-2%20-%20JSON%20OBJECTS%20%2B%20ARRAYS%20ASSIGNMENT%20%2B%20STATE.tsx#L95
@tyriem @aaronksaunders @aaron@clearlyinnovative.com