Comments (2)
You can explicitly type the recoil value:
let cartItems: Recoil.readWrite(array(string)) =
Recoil.atom({key: "cartItems", default: [||]});
or the array itself:
let cartItems =
Recoil.atom({key: "cartItems", default: ([||]: array(string))});
from rescript-recoil.
thank you
from rescript-recoil.
Related Issues (16)
- How to use asyncSelectorFamily? HOT 1
- Bind to Atom Effects HOT 3
- Atom Effect onSet HOT 3
- Applications under the /examples does not work because of "module": "es6" HOT 1
- not working with rescript-react
- dangerouslyAllowMutability binding HOT 4
- Update to allow for rescript 0.3.1 HOT 1
- question: why gitignore .bs.js files? HOT 2
- The value `atomWithDangerouslyAllowMutability` can't be found in Recoil
- Dealing with `DefaultValue` HOT 2
- When will this library use React 17 as a peer dependency? HOT 1
- Value equality in selectors? HOT 1
- Update rescript-recoil for rescript 11 HOT 3
- RecoilRoot incorrect initializeState HOT 1
- Add support for helpers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rescript-recoil.