DEV Community

Discussion on: Rewrite Auth0 Example with React Hooks

Collapse
 
terrierscript profile image
terrierscript

Sorry for late.

I think not need store to redux but it's enable with useEffect

maybe like this:

const TokenSync => ({updateTokenAction]){
  const { token } =  useAuth0Context() // append token 
  useEffect( () => updateTokenAction(token), [token])
  return null
}

// usage: <TokenSync />