You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've implemented recoil to manage my state however I get the following errors in the console:
Steps to reproduce
gatsby new gatsby-auth gatsbyjs/gatsby-starter-hello-world
cd gatsby-auth
yarn add recoil
yarn add recoil-persist
insert the following into gatsby-browser.js
importReactfrom'react'import{RecoilRoot}from"recoil";importrecoilPersistfrom'recoil-persist'const{ RecoilPersist, updateState }=recoilPersist(['tokenState'],// configurate that atoms will be stored (if empty then all atoms will be stored),{key: 'recoil-persist',// this key is using to store data in local storagestorage: localStorage// configurate which stroage will be used to store the data})exportconstwrapPageElement=({element, props})=>{return(<RecoilRootinitializeState={({set})=>updateState({set})}><RecoilPersist/>{element}</RecoilRoot>)}
This discussion was converted from issue #28057 on November 16, 2020 10:10.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I've implemented
recoil
to manage my state however I get the following errors in the console:Steps to reproduce
insert the following into
gatsby-browser.js
Environment
Beta Was this translation helpful? Give feedback.
All reactions