Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zcaudate/js-blessed.store-test
Stores with jotai and valtio
https://github.com/zcaudate/js-blessed.store-test
Last synced: 25 days 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 (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-14T01:04:04.000Z (over 3 years ago)
- Last Synced: 2024-11-14T12:47:40.423Z (3 months 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:![](https://user-images.githubusercontent.com/1455572/118162336-333f3e00-b453-11eb-9ff2-a82e7a376774.png)
It triggers an error in the Suspense element:
![](https://user-images.githubusercontent.com/1455572/118162341-35a19800-b453-11eb-9a53-3a1b4cfe09c3.png)
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
```