jotai + deno + fresh + preact #2040
Unanswered
lveillard
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw some discussions about this, and it took me a while to make them work. Also there are some weird little bugs, but it works!
Update deno.json imports:
And then you can define your atoms in files:
And use them in preact components like this:
Some key things to consider:
Some bugs i've encountered
Something happens here that escapes my pay grade
![image](https://private-user-images.githubusercontent.com/29461076/254305048-4beb0b8b-5e3e-4136-90b8-a9fdb55e198d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODQ4MDksIm5iZiI6MTczOTY4NDUwOSwicGF0aCI6Ii8yOTQ2MTA3Ni8yNTQzMDUwNDgtNGJlYjBiOGItNWUzZS00MTM2LTkwYjgtYTlmZGI1NWUxOThkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA1NDE0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2Mjg2ZTg3YjE2MjQxZTM3ZTM2YTI4ZDI5OTc1OGMyZTM2NDNhYmQwMmE4N2VkMmI4ZjljODIzYjhkNjI0MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.qNjl_iJYDc9I7pOslZoi0WUf18gbGlLFFqE31xfUrdc)
Also when this error happens, all the atoms stop working, so if your atoms are not working, check your console ;)
Other than that, you can define your atoms in other files and it seems to properly work.
Beta Was this translation helpful? Give feedback.
All reactions