Last active
October 13, 2022 13:28
-
-
Save artalar/9fa5dbb11f415d8eaa7ecff83520f671 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
const analyticsAtom = atom((ctx) => { | |
const { url } = ctx.spy(routeAtom); | |
const { name } = ctx.get(userAtom); | |
ctx.schedule(() => logAnalytics("visit_page", url, name)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment