The PR enables the getOnInit option on tokenAtom according to https://github.com/pmndrs/jotai/discussions/1999 so it will be populated before first use. Without this measure, other initialization tasks like createFetchClient will behave incorrectly from tokenAtom being null even when the user is logged in.
The PR enables the
getOnInit
option ontokenAtom
according to https://github.com/pmndrs/jotai/discussions/1999 so it will be populated before first use. Without this measure, other initialization tasks likecreateFetchClient
will behave incorrectly fromtokenAtom
being null even when the user is logged in.