recoil-next 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/index.cjs +486 -217
- package/dist/index.d.cts +9 -26
- package/dist/index.d.ts +9 -26
- package/dist/index.mjs +487 -218
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npm install recoil-next
|
|
|
22
22
|
|
|
23
23
|
```jsx
|
|
24
24
|
import React from 'react';
|
|
25
|
-
import {
|
|
25
|
+
import {RecoilRoot, atom, useRecoilState} from 'recoil-next';
|
|
26
26
|
|
|
27
27
|
const textState = atom({
|
|
28
28
|
key: 'textState',
|
|
@@ -42,7 +42,7 @@ function CharacterCounter() {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<div>
|
|
45
|
-
<input type="text" value={text} onChange={
|
|
45
|
+
<input type="text" value={text} onChange={e => setText(e.target.value)} />
|
|
46
46
|
<p>Character count: {text.length}</p>
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
@@ -70,10 +70,10 @@ This library is a drop-in replacement for the original Recoil library. Simply re
|
|
|
70
70
|
|
|
71
71
|
```jsx
|
|
72
72
|
// Before
|
|
73
|
-
import {
|
|
73
|
+
import {RecoilRoot, atom, useRecoilState} from 'recoil';
|
|
74
74
|
|
|
75
75
|
// After
|
|
76
|
-
import {
|
|
76
|
+
import {RecoilRoot, atom, useRecoilState} from 'recoil-next';
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
## Requirements
|
|
@@ -90,4 +90,4 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
90
90
|
|
|
91
91
|
## Community
|
|
92
92
|
|
|
93
|
-
This is a community-maintained continuation of the original Recoil project. We aim to maintain compatibility while adding new features and improvements.
|
|
93
|
+
This is a community-maintained continuation of the original Recoil project. We aim to maintain compatibility while adding new features and improvements.
|