https://github.com/zcaudate/js-blessed.store-test
Stores with jotai and valtio
https://github.com/zcaudate/js-blessed.store-test
Last synced: over 1 year ago
JSON representation
Stores with jotai and valtio
- Host: GitHub
- URL: https://github.com/zcaudate/js-blessed.store-test
- Owner: zcaudate
- Created: 2021-05-13T17:23:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-14T01:04:04.000Z (about 5 years ago)
- Last Synced: 2025-01-14T05:42:27.515Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Issue with Suspense
There is a current bug with jotai and suspense. Maybe it's because I'm
[using it
wrong](https://github.com/zcaudate/js-blessed.store-test/blob/master/src/main.js#L30-L34).
Once the **FETCH** button is clicked, which sets the atom (initially
null) with a promise:

It triggers an error in the Suspense element:

The error:
``` javascript
// React will try to recreate this component tree from scratch using the error boundary you provided, Debug.
[Bug] deleting atomState with read promise {
toString: [Function: toString],
init: null,
read: [Function (anonymous)],
write: [Function (anonymous)],
id: 'js-blessed.store-test.main/UserData',
section: 'js-blessed.store-test.main/User'
}
```
### Commands
``` shell
make init
make dev
```