skip to Main Content

Reactjs – React undefined value

Can anyone explain how to initialize a value via the useState hook from the store where user information is stored? After the first rendering it returns undefined const [lastName, setLastName] = useState<string|null>(store.user.lastName); I've used useEffect. But idk how to do…

VIEW QUESTION
Back To Top
Search