Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const App = () => {
- const [state, setState] = useState('')
- const stateFromStore = useSelector((state) => state.stateFromStore)
- useEffect(() => {
- if (!stateFromStore) return
- setState(stateFromStore + anyOtherLogic)
- }, [stateFromStore])
- return jsx
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement