Advertisement
Guest User

Untitled

a guest
Jun 27th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const App = () => {
  2.     const [state, setState] = useState('')
  3.    
  4.     const stateFromStore = useSelector((state) => state.stateFromStore)
  5.    
  6.     useEffect(() => {
  7.         if (!stateFromStore) return
  8.        
  9.         setState(stateFromStore + anyOtherLogic)
  10.        
  11.     }, [stateFromStore])
  12.    
  13.     return jsx
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement