Created
January 25, 2021 21:31
-
-
Save thinkle/925cad62e4c2df14bdc0a786e2b20249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { writable } from 'svelte/store'; | |
let storedToken = localStorage.getItem('token'); | |
if (storedToken) { | |
initialValue = JSON.parse(storedToken); | |
} | |
export const token = writable(initialValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment