Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(en): merge Recoil/docs into Recoil/docs @ 87746b52 #198

Open
wants to merge 189 commits into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
2343b96
[docs] Documentation for 0.5
drarmstr Nov 4, 2021
075de10
Fix missing bracket in `testing.md` for `RecoilObserver`
nayunhwan Nov 4, 2021
a260396
getting-started.mdx spelling mistake
tbottini Nov 4, 2021
e9b30fa
french spelling mistakes
tbottini Nov 4, 2021
17cd7d5
Merge pull request #1378 from tbottini/patch-1
drarmstr Nov 4, 2021
64fcc1a
Merge pull request #1373 from drarmstr/docs
drarmstr Nov 4, 2021
d89d797
Merge pull request #1376 from nayunhwan/patch-1
drarmstr Nov 4, 2021
ef7c6a6
fix: typo Loadable in docs [ko]
JUSTIVE Nov 5, 2021
f776fd2
fix: typo Loadable in docs [ko]
JUSTIVE Nov 5, 2021
4d53303
fix: typo in docs [ko]
JUSTIVE Nov 5, 2021
353d5ff
fix: typo in docs [ko]
JUSTIVE Nov 5, 2021
fbc85ca
fix: typo in docs [ko]
JUSTIVE Nov 5, 2021
a845d46
[docs] Ignore generated files
drarmstr Nov 5, 2021
dd89a22
Merge pull request #1392 from drarmstr/docs
drarmstr Nov 5, 2021
71b28ef
[docs] Fix typo in useRecoilRefresher()
drarmstr Nov 5, 2021
28ceeec
Merge pull request #1393 from drarmstr/docs
drarmstr Nov 6, 2021
b59cab9
Merge pull request #1379 from tbottini/patch-2
drarmstr Nov 6, 2021
f22667f
Merge pull request #1385 from JUSTIVE/docs
drarmstr Nov 6, 2021
fa552af
[docs] Fix useRecoilRefresher()
drarmstr Nov 7, 2021
918cc02
Merge pull request #1398 from drarmstr/docs
drarmstr Nov 7, 2021
9d2d3c7
Update testing.md with asynchronous default atom (#1463)
Dec 1, 2021
0a18baf
Update selector.md (#1492)
JungKyuHyun Dec 9, 2021
1c0928b
initial refine docs
bsouthga Dec 12, 2021
5ae66bb
Update links and sidebar, add parens for functions, minor polish
drarmstr Dec 14, 2021
c79ab9e
Fix typo
drarmstr Dec 14, 2021
5ba3cf8
Merge branch 'facebookexperimental:docs' into docs
bsouthga Dec 30, 2021
b9bc1c4
PR #1497 feedback
bsouthga Dec 30, 2021
a9449ec
typo: correct typo in selector.md (#1516)
kelvinsekx Jan 4, 2022
72e6e99
additional feedback nits
bsouthga Jan 4, 2022
4344792
[docs] Document custom hooks that use Recoil states (#1528)
patrickspafford Jan 8, 2022
4513739
[docs] Add more examples for querying atom defaults. (#1542)
drarmstr Jan 11, 2022
2db39e6
[docs] fix typos (#1565)
Tomas2D Jan 24, 2022
9932f5e
[docs] Recoil 0.6 Documentation (#1514)
drarmstr Jan 29, 2022
2e7d42d
[docs/Korean] Fix missing translations and typo (#1584)
MaxKim-J Jan 31, 2022
49f32c1
[docs/korean] update legacy translation to latest content (#1593)
C17AN Feb 8, 2022
e104b65
[docs/korean] add korean translation of [Guides/Testing] documentatio…
C17AN Feb 8, 2022
75ebe35
Add note about retaining a snapshot in async selector jest tests (#1592)
vntw Feb 10, 2022
c5b5721
Update asynchronous-data-queries.md (#1607)
Yshayy Feb 16, 2022
d8b063b
Merge branch 'docs' of https://github.com/facebookexperimental/Recoil…
drarmstr Feb 18, 2022
99b0976
Update to work with latest Docusaurus - see https://github.com/facebo…
drarmstr Feb 18, 2022
ff7cba9
Restructure documentation to top-level tab
drarmstr Feb 18, 2022
62a7188
Flatten Refine sidebar
drarmstr Feb 18, 2022
442ecd1
Initial Refine documentation
drarmstr Feb 18, 2022
7fc2487
[docs] Fix broken links
drarmstr Feb 18, 2022
c78eecb
Merge pull request #1618 from drarmstr/docs
drarmstr Feb 18, 2022
fbb42fc
Adding ELI5 video
dmitryvinn Feb 18, 2022
03b3c2d
Improve test guide (#1619)
FokkeZB Feb 18, 2022
338f085
[docs] Document Recoil Sync Library
drarmstr Nov 24, 2021
934f93f
[docs] polish
drarmstr Nov 30, 2021
655fb2a
Rebase, link with Refine docs, reformat to a top-level-tab
drarmstr Feb 19, 2022
06bbdf4
[docs] Fix broken links, polish
drarmstr Feb 19, 2022
00fff48
Merge pull request #1462 from drarmstr/docs-recoil-sync
drarmstr Feb 19, 2022
9a579b1
[docs] Link preview docs to source
drarmstr Feb 19, 2022
4d533d6
Merge pull request #1622 from drarmstr/docs
drarmstr Feb 19, 2022
b4b9573
[docs] Better document React transitions
drarmstr Feb 19, 2022
cc6d69a
Merge pull request #1623 from drarmstr/docs
drarmstr Feb 19, 2022
f1057e5
[docs] Improve some Recoil Sync links
drarmstr Feb 19, 2022
f3d8308
Merge pull request #1624 from drarmstr/docs
drarmstr Feb 19, 2022
bc9167a
Merge pull request #1621 from dmitryvinn/docs
drarmstr Feb 19, 2022
6908419
Improved phrasing. (#1626)
SyedTayyabUlMazhar Feb 22, 2022
6c846d5
[docs] Clarify/cleanup some async snapshot docs.
drarmstr Feb 22, 2022
eef512b
Merge pull request #1628 from drarmstr/docs
drarmstr Feb 22, 2022
85f9c2d
[docs] Polish Recol Sync store implementation examples
drarmstr Feb 22, 2022
dfa6ccf
Merge pull request #1629 from drarmstr/docs
drarmstr Feb 22, 2022
7bc0861
[docs] Update Recoil Sync API docs for current implementation with re…
drarmstr Feb 22, 2022
cdc31d0
[Docs] Update Recoil Sync API docs for reading undefines
drarmstr Feb 22, 2022
0ca26fb
Merge pull request #1630 from drarmstr/docs
drarmstr Feb 22, 2022
41b1a3e
Update asynchronous-data-queries.md (#1633)
kongmoumou Feb 23, 2022
f6b279d
[docs] Mention retaining snapshots for async selectors in release notes
drarmstr Feb 24, 2022
018f627
Merge pull request #1637 from drarmstr/docs
drarmstr Feb 24, 2022
e1c7953
[docs][recoil-sync] Improve internal documentation links
drarmstr Feb 24, 2022
5a53c91
Merge pull request #1638 from drarmstr/docs
drarmstr Feb 24, 2022
5630766
Adding social banner
dmitryvinn Mar 3, 2022
c902593
Merge branch 'docs' of github.com:dmitryvinn/Recoil into docs
dmitryvinn Mar 3, 2022
575d08a
Merge pull request #1648 from dmitryvinn/docs
drarmstr Mar 3, 2022
fdb164c
[docs/korean] add translate useRecoilRefresher.md to Korean (#1653)
hellojaehyeok Mar 8, 2022
c2c935c
Update selector.md (#1665)
gd-cho Mar 16, 2022
d864227
[docs] Use distinct key strings in Basic Tutorial
drarmstr Mar 16, 2022
6388520
[docs] Use distinct key strings in Basic Tutorial (#1676)
drarmstr Mar 16, 2022
22e9958
Merge branch 'docs' of https://github.com/facebookexperimental/Recoil…
drarmstr Mar 22, 2022
2e75593
[docs] Recoil 0.7 Documentation
drarmstr Mar 23, 2022
af2eb9f
[docs] Recoil 0.7 release notes
drarmstr Mar 23, 2022
76be6c4
[docs] Recoil 0.7 Release Notes
drarmstr Mar 23, 2022
51dd9c8
[docs] Update types for D35070577
drarmstr Mar 24, 2022
fd1f384
fix: misspelled double greater than sign
lifeisegg123 Mar 28, 2022
6849108
Merge pull request #1691 from drarmstr/docs_0_7
drarmstr Apr 1, 2022
2971166
Merge pull request #1700 from lifeisegg123/fix/docs
drarmstr Apr 1, 2022
a951aa9
[docs] Clarify family parameter types
drarmstr Apr 1, 2022
6920a5f
Merge pull request #1709 from drarmstr/docs
drarmstr Apr 1, 2022
a03ef6b
[docs] 0.7.1 Release Documentation
drarmstr Apr 13, 2022
23fc31b
Merge pull request #1738 from drarmstr/docs
drarmstr Apr 13, 2022
61bfa51
[docs] 0.7.2 Release Documentation
drarmstr Apr 14, 2022
66a1f7d
Merge pull request #1739 from drarmstr/docs
drarmstr Apr 14, 2022
efeea91
[docs/korean] fix typo and highlighted words (#1735)
Yongveloper Apr 15, 2022
b91a086
[docs] Update link to React transitions documentation for React 18
drarmstr Apr 15, 2022
925948b
Merge pull request #1741 from drarmstr/docs
drarmstr Apr 15, 2022
2c79aa1
fix typo: ReocilLoadable -> RecoilLoadable (#1761)
bolinfest Apr 29, 2022
1820053
Fix Korean translation
vetan2 May 11, 2022
08acb56
Merge pull request #1779 from vetan2/patch-4
drarmstr May 11, 2022
63d6a74
[docs] Initial recoil-relay Documentation (#1789)
drarmstr May 13, 2022
fb69782
[docs] fix links
drarmstr May 13, 2022
a2280d2
Merge pull request #1790 from drarmstr/docs
drarmstr May 13, 2022
34c9d79
[docs] Update recoil-relay types
drarmstr May 14, 2022
0e3573d
Merge pull request #1794 from drarmstr/docs
drarmstr May 14, 2022
501ed5d
[docs] Update recoil-relay examples
drarmstr May 14, 2022
92d150e
Merge pull request #1795 from drarmstr/docs
drarmstr May 14, 2022
5c4c91e
[docs] Adjust installation docs for new packages
drarmstr May 16, 2022
17166cc
Merge pull request #1797 from drarmstr/docs
drarmstr May 16, 2022
63ef834
fixed typo in graphQLSelectorFamily.md
AssafKr May 29, 2022
0fbf79c
Merge pull request #1825 from AssafKr/patch-1
noritheduck May 31, 2022
82dec8c
[docs] recoil-relay 0.1 Documentation
drarmstr Jun 1, 2022
7293946
[docs] Recoil 0.7.3 documentation
drarmstr Jun 2, 2022
dd3bba6
[docs] cleanup variables typing
drarmstr Jun 2, 2022
a4794b3
Merge pull request #1830 from drarmstr/docs
drarmstr Jun 2, 2022
4d8332e
[docs/korean] Update motivation.md
identity16 Jun 4, 2022
d5e36ab
docs: fix typo
kulshekhar Jun 4, 2022
3553b62
Merge pull request #1837 from kulshekhar/patch-1
drarmstr Jun 7, 2022
0a0eb3d
Merge pull request #1836 from identity16/patch-1
drarmstr Jun 7, 2022
e53259b
[docs] Update recoil-sync docs to remove hooks interface.
drarmstr Jun 9, 2022
2ed8b2c
[docs/korean] fix typo
hyungjun7 Jun 10, 2022
3fbf216
Merge pull request #1861 from hyungjun7/patch-1
drarmstr Jun 10, 2022
d9e17f3
Merge pull request #1855 from drarmstr/docs
drarmstr Jun 10, 2022
d1ed8f6
[docs] Minor recoil-sync tweaks
drarmstr Jun 10, 2022
be872d7
Merge pull request #1862 from drarmstr/docs
drarmstr Jun 10, 2022
d7c5002
FIX: made youtube iframes responsive
swaroopRajwal Jun 17, 2022
c60cbee
FIX: autoplay was set to 1
swaroopRajwal Jun 17, 2022
a069b4c
Merge pull request #1868 from swaroopRajwal/docs
drarmstr Jun 17, 2022
a89b332
fix wrong function name setEvent -> setUser
dsonet Jun 22, 2022
b31f3c6
[docs] Documentation update for Recoil 0.7.4 and initial Refine and R…
drarmstr Jun 22, 2022
e928167
Merge pull request #1876 from drarmstr/docs
drarmstr Jun 22, 2022
0fbb606
Merge pull request #1875 from dsonet/patch-1
noritheduck Jun 22, 2022
4dec003
[docs] Document GraphQL Fragments
drarmstr Jun 24, 2022
64143aa
[docs] Document GraphQL fragment queries
drarmstr Jun 24, 2022
d3de0a5
Merge pull request #1884 from drarmstr/docs
drarmstr Jun 24, 2022
58e9adf
[docs] Restructure recoil-relay documentation for clarity
drarmstr Jun 24, 2022
6e950cf
Merge pull request #1885 from drarmstr/docs
drarmstr Jun 24, 2022
bf507b4
[docs] reference @inline directive for GraphQL fragments
drarmstr Jun 28, 2022
a8fe4d4
[docs] missing the
drarmstr Jun 28, 2022
1ea005a
Merge pull request #1893 from drarmstr/docs
drarmstr Jun 28, 2022
50be698
[docs] Clarify proxy object for useRecoilCallback() interface.
drarmstr Jun 28, 2022
29e421c
Merge pull request #1895 from drarmstr/docs
drarmstr Jun 28, 2022
90703d4
[docs/korean] Add useRecoilStoreID.md for translate korean
00-lucid Jul 13, 2022
4f80366
Merge pull request #1 from 00-lucid/patch-1
00-lucid Jul 13, 2022
36f0b0e
[docs/korean] translate guide/transition.md
tracy-cho Jul 25, 2022
54bd17f
[docs] Fix typo
upa-r-upa Aug 5, 2022
d4f9f3b
Merge pull request #1907 from 00-lucid/docs
drarmstr Aug 9, 2022
cd0798a
Merge pull request #1921 from tracy-cho/docs
drarmstr Aug 9, 2022
6bb334b
Merge pull request #1934 from upa-r-upa/docs/fix-typo
drarmstr Aug 9, 2022
7a4553d
[docs] Recoil 0.7.5 Documentation
drarmstr Aug 11, 2022
adfcb29
Merge pull request #1949 from drarmstr/docs
drarmstr Aug 11, 2022
e3b0b6f
[docs/korean] fix typo in motivation
DavidYang2149 Aug 18, 2022
5c53aa6
[docs/korean] update translate waitForAllSettled.md to Korean
DavidYang2149 Aug 18, 2022
4ec4bb9
[docs] Fix typo in RecoilURLSyncTransit example
drarmstr Aug 18, 2022
5f435d1
Merge pull request #1963 from DavidYang2149/fix-typo-ko-motivation
drarmstr Aug 18, 2022
7742c0e
Merge pull request #1970 from drarmstr/docs
drarmstr Aug 18, 2022
27748d6
[docs] Refine 0.1.1 release
drarmstr Aug 18, 2022
341e094
Merge pull request #1973 from drarmstr/docs
drarmstr Aug 18, 2022
52a342a
Merge pull request #1964 from DavidYang2149/docs-update-translate-wai…
drarmstr Aug 22, 2022
a2344ae
Fix typo
H2-won Aug 30, 2022
ce42cd2
please add import section {selector}
1230068 Aug 30, 2022
65e1b23
Merge pull request #1987 from H2-won/docs
drarmstr Aug 31, 2022
5a4b029
Merge pull request #1988 from 8616525/patch-1
drarmstr Sep 1, 2022
a9068a9
[docs/korean] update translate dev-tools.md to Korean
JinleeJeong Sep 6, 2022
4c71d67
Merge pull request #1997 from JinleeJeong/docs-update-translate-devTools
drarmstr Sep 7, 2022
6e8bdcb
Create useRecoilTransaction.md
geunu97 Sep 8, 2022
43a34bb
Merge pull request #2002 from geunu97/docs
drarmstr Sep 9, 2022
02d5d4e
[docs] Document `syncEffect()` item and store keys with atom families
drarmstr Sep 16, 2022
68a7f78
[docs] Fix typo in sync effects documentation
drarmstr Sep 16, 2022
3afa642
Merge pull request #2011 from drarmstr/docs
drarmstr Sep 16, 2022
7d28ad7
[docs/Korean] 📝intro.md
yorusiku Sep 21, 2022
102f2bf
Merge pull request #2024 from yorusiku/docs
wd-fb Sep 21, 2022
25adf59
[docs] Link to SideGuide interactive tutorial
drarmstr Sep 23, 2022
7028d2a
[docs] change to tsx, prettier formatting
wd-fb Sep 23, 2022
c8e5d25
[docs] make RecoilURLSyncTransit 'handlers' a stable constant, unst…
wd-fb Sep 23, 2022
3dcb165
[docs] add note about handlers
wd-fb Sep 23, 2022
0023f8f
[docs] Expose updateItems in RecoilSync's Listen Interface
luishdz1010 Sep 24, 2022
a75c0cb
[docs] clean up doc, fix type errors: children is required, queryParams
wd-fb Sep 24, 2022
35ad73e
Merge pull request #2031 from drarmstr/docs
drarmstr Oct 3, 2022
3fd86d2
Merge pull request #2033 from wd-fb/docs
wd-fb Oct 4, 2022
66725d4
[docs] Clarify other hooks already support transitions
drarmstr Oct 5, 2022
60b240d
Merge pull request #2055 from drarmstr/docs
drarmstr Oct 5, 2022
7c8b9cc
Merge pull request #2036 from luishdz1010/recoil-sync-expose-updateIt…
drarmstr Oct 11, 2022
03c44e4
[docs] Release docmentation for Recoil 0.7.6 and Recoil Sync 0.2
drarmstr Oct 11, 2022
a1331fc
Merge pull request #2060 from drarmstr/docs
drarmstr Oct 11, 2022
38bcc13
[docs] Improve GraphQL mutation documentation
drarmstr Oct 13, 2022
eeb464c
Merge pull request #2064 from drarmstr/docs
drarmstr Oct 13, 2022
226491f
[docs/korean] update translate useRecoilTransaction.md to Korean
JinleeJeong Oct 17, 2022
87746b5
Merge pull request #2065 from JinleeJeong/docs-update-translate-useRe…
wd-fb Oct 22, 2022
9671048
docs(en): merging all conflicts
docschina-bot Oct 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,18 @@ dist
# TernJS port file
.tern-port

# build outputs
cjs
es
native
umd
/index.d.ts
nightly-build-files
/build
/packages

# Mac
.DS_Store

# NPM Pakcage lock since we use yarn.lock
package-lock.json
2 changes: 2 additions & 0 deletions docs/blog/2021-07-30-0.4.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Recoil 0.4

We are pleased to announce the release of Recoil 0.4 with configurable selector caches, improved API for transactions with multiple atoms, and other optimizations and fixes.

<!--truncate-->

## Configurable selector caches

The new [`cachePolicy_UNSTABLE`](/docs/api-reference/core/selector#cache-policy-configuration) property in [selectors](/docs/api-reference/core/selector) and [selector families](/docs/api-reference/utils/selectorFamily) allows you to configure the caching behavior of a selector's internal cache. This property can be useful for reducing memory in applications that have a large number of selectors or selectors that have a large number of changing dependencies.
Expand Down
2 changes: 2 additions & 0 deletions docs/blog/2021-08-26-0.4.1-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Recoil 0.4.1

Recoil 0.4.1 has been released with some performance optimizations and fixes focused on optimizing when React will re-render components based on Recoil state changes.

<!--truncate-->

- Components using selectors will no longer re-render if the selector evaluates to an equivalent value, based on reference equality.
- Components previously rendered twice on initial render when not using React's Concurrent Mode.
- When selectors have async dependencies that resolve, some environments of React that previously caused unnecessary re-renders no longer will.
Expand Down
34 changes: 34 additions & 0 deletions docs/blog/2021-11-03-0.5.0-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Recoil 0.5
---

Welcome to Recoil 0.5 with a few new APIs and improvements.

<!--truncate-->

## Hook for refreshing selectors

The [`useRecoilRefresher_UNSTABLE()`](/docs/api-reference/core/useRecoilRefresher) hook has been added for refreshing selectors that execute data queries. This is useful if you just want to refresh for newer data or retry due to an error. ([#972](https://github.com/facebookexperimental/Recoil/pull/972), [#1294](https://github.com/facebookexperimental/Recoil/pull/1294), [#1302](https://github.com/facebookexperimental/Recoil/pull/1302))

## Atom effect improvements

* Add `isReset` parameter to `onSet()` callback to know if the atom was reset. ([#1358](https://github.com/facebookexperimental/Recoil/pull/1358), [#1345](https://github.com/facebookexperimental/Recoil/pull/1345))
* Add `getLoadable()`, `getPromise()`, and `getInfo_UNSTABLE()` for reading other atoms. ([#1205](https://github.com/facebookexperimental/Recoil/pull/1205), [#1210](https://github.com/facebookexperimental/Recoil/pull/1210))

## Loadable factories

The [`RecoilLoadable`](/docs/api-reference/core/Loadable#creating-loadables) interface is now available for making your own `Loadable` objects. ([#1263](https://github.com/facebookexperimental/Recoil/pull/1263), [#1264](https://github.com/facebookexperimental/Recoil/pull/1264), [#1312](https://github.com/facebookexperimental/Recoil/pull/1312))

## Other fixes and improvements

- Allow class instances in family parameters for Flow ([#1215](https://github.com/facebookexperimental/Recoil/pull/1215))
- `Loadable` improvements:
- Ability to map Loadables with other Loadables. ([#1180](https://github.com/facebookexperimental/Recoil/pull/1180))
- Re-implement Loadable as classes. ([#1315](https://github.com/facebookexperimental/Recoil/pull/1315))
- Fix user-thrown promises in selectors for some cases.
- Improved dev-mode checks:
- Atoms freeze default, initialized, and async values. Selectors should not freeze upstream dependencies. ([#1261](https://github.com/facebookexperimental/Recoil/pull/1261), [#1259](https://github.com/facebookexperimental/Recoil/pull/1259))
- Perform runtime check that required options are provided when creating atoms and selectors. ([#1324](https://github.com/facebookexperimental/Recoil/pull/1324))
- Upgrade Prettier version ([#1366](https://github.com/facebookexperimental/Recoil/pull/1366))

*Also lots of restructuring in preparation for the upcoming `recoil-sync` library release...*
78 changes: 78 additions & 0 deletions docs/blog/2022-01-28-0.6.0-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Recoil 0.6
---

Recoil 0.6 introduces improved support for React 18, including concurrent rendering and transitions, along with new APIs, fixes, and optimizations.

<!--truncate-->

## React 18

Recoil 0.6 uses the latest APIs from React 18 for improved safety and performance. This release is compatible with [concurrent rendering](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html#whats-coming-in-react-18) and [`<React.StrictMode>`](https://reactjs.org/docs/strict-mode.html), which is useful for testing and identifying potential issues for concurrent rendering. Making Recoil and React state changes in the same batch now stay in sync to provided a consistent view of state. Some of these improvements are also available while using previous versions of React. *When experimenting with React 18 please use the latest RC build, as the original React `18.0.0-rc.0` package has a bug that has since been fixed.*

### Concurrent Rendering and Transitions

React 18 offers a new hook [`useTransition()`](https://reactjs.org/docs/concurrent-mode-patterns.html#transitions) for transitioning to a new state while having control over what to render before the new state is ready. Recoil should be compatible with this approach and provides a consistent view with React state. However, React 18 may fallback from concurrent updates and does not yet officially support initiating transitions based on state changes to external stores. This is something the React team is looking into supporting, but until then we have added experimental support for this through the following hooks. This API is considered experimental because there may be use cases we haven’t found which are not handled.
* `useRecoilState_TRANSITION_SUPPORT_UNSTABLE()`
* `useRecoilValue_TRANSITION_SUPPORT_UNSTABLE()`
* `useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE()`

Here's an example that displays the current results while a new result is loading:
```jsx
function QueryResults() {
const queryParams = useRecoilValue_TRANSITION_SUPPORT_UNSTABLE(queryParamsAtom);
const results = useRecoilValue_TRANSITION_SUPPORT_UNSTABLE(myQuerySelector(queryParams));
return results;
}

function MyApp() {
const [queryParams, setQueryParams] = useRecoilState_TRANSITION_SUPPORT_UNSTABLE(queryParamsAtom);
const [inTransition, startTransition] = useTransition();
return (
<div>
{inTransition ? <div>[Loading new results...]</div> : ''}
Results: <React.Suspense><QueryResults /></React.Suspense>
<button
onClick={() => {
startTransition(() => {
setQueryParams(...new params...);
});
}
>
Start New Query
</button>
</div>
);
}
```

## New Features

* Recoil Callbacks
* [`useRecoilCallback()`](/docs/api-reference/core/useRecoilCallback) can now also refresh selector caches, similar to [`useRecoilRefresher_UNSTABLE()`](/docs/api-reference/core/useRecoilRefresher). ([#1413](https://github.com/facebookexperimental/Recoil/pull/1413))
* Callbacks from selectors using [`getCallback()`](/docs/api-reference/core/selector#returning-objects-with-callbacks) can now mutate, refresh, and transact state in addition to reading it, similar to [`useRecoilCallback()`](/docs/api-reference/core/useRecoilCallback). ([#1498](https://github.com/facebookexperimental/Recoil/pull/1498))
* Store IDs - A `StoreID` can now be obtained using [`useRecoilStoreID()`](/docs/api-reference/core/useRecoilStoreID) ([#1417](https://github.com/facebookexperimental/Recoil/pull/1417)) or the `storeID` parameter in [atom effects](/docs/guides/atom-effects) ([#1414](https://github.com/facebookexperimental/Recoil/pull/1414)).
* [`RecoilLoadable.of()`](/docs/api-reference/core/Loadable#examples) and [`RecoilLoadable.all()`](/docs/api-reference/core/Loadable#examples) factories now accept either literal values, async Promises, or Loadables. This is comparable to `Promise.resolve()` and `Promise.all()` ([#1455](https://github.com/facebookexperimental/Recoil/pull/1455), [#1442](https://github.com/facebookexperimental/Recoil/pull/1442)).
* Add `.isRetained()` method for Snapshots and check if snapshot is already released when using `.retain()` in development ([#1546](https://github.com/facebookexperimental/Recoil/pull/1546))

## Breaking Changes
- Atom Effects
- Rename option from `effects_UNSTABLE` to just `effects`, as the interface is mostly stabilizing. ([#1520](https://github.com/facebookexperimental/Recoil/pull/1520))
- [Atom effect](/docs/guides/atom-effects) initializations takes precedence over `<RecoilRoot initializeState={...}>`. ([#1509](https://github.com/facebookexperimental/Recoil/pull/1509))
- `useGetRecoilValueInfo_UNSTABLE()` and `Snapshot#getInfo_UNSTABLE()` always report the node `type`. ([#1547](https://github.com/facebookexperimental/Recoil/pull/1547))
- The [0.3](/blog/2021/05/14/0.3.0-released#breaking-change-preparing-for-memory-management) release introduced the need to retain Snapshots for later use, but it was mostly a warning. Now it is necessary to retain a Snapshot for asynchronous selectors to resolve. See the documentation [here](/docs/api-reference/core/Snapshot#asynchronous-use-of-snapshots) and [here](/docs/guides/testing#testing-async-selectors). Future releases will further enforce this as garbage collection is released.

## Other Fixes and Optimizations
- Reduce overhead of snapshot cloning
- Only clone the current snapshot for callbacks if the callback actually uses it. ([#1501](https://github.com/facebookexperimental/Recoil/pull/1501))
- Cache the cloned snapshots from callbacks unless there was a state change. ([#1533](https://github.com/facebookexperimental/Recoil/pull/1533))
- Fix transitive selector refresh for some cases ([#1409](https://github.com/facebookexperimental/Recoil/pull/1409))
- Fix some corner cases with async selectors and multiple stores ([#1568](https://github.com/facebookexperimental/Recoil/pull/1568))
- Atom effects
- Run atom effects when atoms are initialized from a `set()` during a transaction from [`useRecoilTransaction_UNSTABLE()`](/docs/api-reference/core/useRecoilTransaction) ([#1466](https://github.com/facebookexperimental/Recoil/pull/1466), [#1569](https://github.com/facebookexperimental/Recoil/pull/1569))
- Atom effects are cleaned up when initialized by a Snapshot which is released. ([#1511](https://github.com/facebookexperimental/Recoil/pull/1511), [#1532](https://github.com/facebookexperimental/Recoil/pull/1532))
- Unsubscribe `onSet()` handlers in atom effects when atoms are cleaned up. ([#1509](https://github.com/facebookexperimental/Recoil/pull/1509))
- Call `onSet()` when atoms are initialized with `<RecoilRoot initializeState={...} >` ([#1519](https://github.com/facebookexperimental/Recoil/pull/1519), [#1511](https://github.com/facebookexperimental/Recoil/pull/1511))
- Avoid extra re-renders in some cases when a component uses a different atom/selector. ([#825](https://github.com/facebookexperimental/Recoil/pull/825))
- `<RecoilRoot>` will only call `initializeState()` once during the initial render. ([#1372](https://github.com/facebookexperimental/Recoil/pull/1372))
- Lazily compute and memoize the results of lazy properties, such as from `useGetRecoilValueInfo()` or `Snapshot#getInfo_UNSTABLE()`. ([#1548](https://github.com/facebookexperimental/Recoil/pull/1548), [#1549](https://github.com/facebookexperimental/Recoil/pull/1549))
90 changes: 90 additions & 0 deletions docs/blog/2022-03-25-0.7.0-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: Recoil 0.7
---

Recoil 0.7 offers some minor API improvements, selector optimizations, and other fixes.

<!--truncate-->

## New Features

### Atom Defaults are Optional
It is now optional to provide a default value for an atom. If no default is provided the atom will be kept in a "pending" state (e.g. triggering React Suspense) until it is set. ([#1639](https://github.com/facebookexperimental/Recoil/pull/1639))

This can help avoid awkward typing (such as unecessarily making the type nullable) or awkward placeholder values for the default. An example minimal string atom might be:
```jsx
atom<string>({key: 'MyString'});
```
This is also useful when atoms are initialized with atom effects and a default may not be necessary:
```jsx
atom({
key: 'MyQuery',
effects: [
dbSyncEffect({query, variables}),
],
});
```

### Other New Features
- Add `.getStoreID()` method to [`Snapshot`](/docs/api-reference/core/Snapshot) ([#1612](https://github.com/facebookexperimental/Recoil/pull/1612))
- Publish `RecoilLoadable.loading()` factory for making an async [`Loadable`](/docs/api-reference/core/Loadable) which never resolves. ([#1641](https://github.com/facebookexperimental/Recoil/pull/1641))

## Improvements / Optimizations
### Automatically retain snapshots for the duration of async callbacks.
You now no longer need to manually retain snapshots for async callbacks from [`useRecoilCallback()`](/docs/api-reference/core/useRecoilCallback). ([#1632](https://github.com/facebookexperimental/Recoil/pull/1632))
```jsx
const myCallback = useRecoilCallback(({snapshot}) => async () => {
// No longer necessary to retain() here
await something;
... use snapshot ...
});
```
If you want to save a Snapshot or reference it from closure state from some other scheduled handler, then you still need to [manually retain it](/docs/api-reference/core/Snapshot#asynchronous-use-of-snapshots).

### Other Improvements / Optimizations
- Optimizations for scaling with more selector dependencies. 2x improvement with 100 dependencies, 4x with 1,000, and now able to support 10,000+ dependencies. ([#1651](https://github.com/facebookexperimental/Recoil/pull/1651), [#1515](https://github.com/facebookexperimental/Recoil/pull/1515), [#914](https://github.com/facebookexperimental/Recoil/pull/914))
- Better error reporting when user selector implementations provide inconsistent results ([#1696](https://github.com/facebookexperimental/Recoil/pull/1696))

## Breaking Changes
### Selector evaluation or atom defaults can use a Loadable object

Now the selector `get()` evaluation callback or atom `default` property can use a [`Loadable`](/docs/api-reference/core/Loadable) object. ([#1640](https://github.com/facebookexperimental/Recoil/pull/1640)) This can allow them to more cleanly accept synchronous error states:
```jsx
atom({
key: 'Key',
default: RecoilLoadable.error(new Error('ERROR')),
});
```
or mapped Loadables or placeholders:
```jsx
selector({
key: 'Key',
get: ({get}) => {
const queryLoadable = get(noWait(myQuerySelector));
if (queryLoadable.state === 'loading') {
return PLACEHOLDER;
}
return queryLoadable; // Pass on the query results or error state.
}
})
```

If you wish to explicitly evaluate a selector value to a `Promise`, `Loadable`, or `RecoilState` type object then you can now wrap them with `selector.value()` or `atom.value()`.
```jsx
selector({
key: 'Key',
get: ({get}) => {
// Returns an immediate synchronous value
return selector.value(Promise.resolve('Promise as a value'));
},
});
```

This is only a minor change. It helps make the API more consisent for handling wrappers such as `Promise` and `Loadable`, though is not yet available across the entire API. But, it helps set the stage for future potential ability to explicitly set atoms and selectors to asynchronous values or error states.

### Other Breaking Changes
- [`useRecoilCallback()`](/docs/api-reference/core/useRecoilCallback) now provides a snapshot for the latest state instead of the latest rendered state, which had bugs ([#1610](https://github.com/facebookexperimental/Recoil/pull/1610), [#1604](https://github.com/facebookexperimental/Recoil/pull/1604))

## Fixes
- Freezing user values in dev mode now works in JS environments without the `Window` interface. ([#1571](https://github.com/facebookexperimental/Recoil/pull/1571))
- Avoid spurious console errors from atom effects when calling `setSelf()` from `onSet()` handlers. ([#1589](https://github.com/facebookexperimental/Recoil/pull/1589), [#1582](https://github.com/facebookexperimental/Recoil/pull/1582))
16 changes: 16 additions & 0 deletions docs/blog/2022-04-12-0.7.1-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Recoil 0.7.1
---

Typing and various improvements

<!--truncate-->

### Typing
- Add explicit and required `children` prop to `<RecoilRoot>` and `useRecoilBridgeAcrossReactRoots_UNSTABLE()` for TypeScript to support the [removal of implicit children](https://solverfox.dev/writing/no-implicit-children/) with [`@types/react@^18.0.0](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210) for React 18. ([#1718](https://github.com/facebookexperimental/Recoil/pull/1718), [#1717](https://github.com/facebookexperimental/Recoil/pull/1717), [#1726](https://github.com/facebookexperimental/Recoil/pull/1726), [#1731](https://github.com/facebookexperimental/Recoil/pull/1731))
- Update typing for [family parameters](/docs/api-reference/utils/atomFamily#parameter-type) to better support Map, Set, and classes with `toJSON()`. ([#1709](https://github.com/facebookexperimental/Recoil/pull/1709), [#1703](https://github.com/facebookexperimental/Recoil/pull/1703))

### Fixes
- Avoid dev-mode console error with React 18 when using shared async selectors across multiple `<RecoilRoot>`'s. ([#1712](https://github.com/facebookexperimental/Recoil/pull/1712))
- Cleanup potential memory leak when using async selectors. ([#1714](https://github.com/facebookexperimental/Recoil/pull/1714))
- Fix potentially hung async selectors when shared across multiple roots that depend on atoms initialized with promises that don't resolve. ([#1714](https://github.com/facebookexperimental/Recoil/pull/1714))
11 changes: 11 additions & 0 deletions docs/blog/2022-04-14-0.7.2-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Recoil 0.7.2
---

Selector optimizations and fixes

<!--truncate-->

### Optimizations and Fixes
- Selector cache lookup optimizations ([#1720](https://github.com/facebookexperimental/Recoil/pull/1720), [#1736](https://github.com/facebookexperimental/Recoil/pull/1736))
- Allow async selectors to re-evaluate when async dependencies are discovered with stale state ([#1736](https://github.com/facebookexperimental/Recoil/pull/1736))
7 changes: 7 additions & 0 deletions docs/blog/2022-06-01-recoil-0.7.3-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Recoil 0.7.3
---

- Enable atoms and selectors to be used in [family parameters](/docs/api-reference/utils/selectorFamily#parameter-type) ([#1740](https://github.com/facebookexperimental/Recoil/pull/1740))
- Add `parentStoreID_UNSTABLE` to atom effects for the parent Recoil store the atom instance was cloned from. This enables the [pre-fetch pattern for GraphQL](/docs/recoil-relay/graphql-queries#pre-fetch-graphql). ([#1744](https://github.com/facebookexperimental/Recoil/pull/1744))
- Atom effects can initialize or set atoms to wrapped values ([#1681](https://github.com/facebookexperimental/Recoil/pull/1681))
33 changes: 33 additions & 0 deletions docs/blog/2022-06-02-recoil-relay-0.1.0-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Recoil Relay 0.1
---

Initial open source release for the [`recoil-relay`](/docs/recoil-relay/introduction) library for using **GraphQL**!

This library helps Recoil perform type safe and efficient queries using [GraphQL](https://graphql.org/) with the [Relay](https://relay.dev) library. It provides selectors which can easily query with GraphQL. The queries are synced with the Recoil data-flow graph so downstream selectors can derive state from them, they can depend on upstream Recoil state, and they are automatically subscribed to any changes in the graph from Relay. Everything stays in sync automatically.

### Example
A GraphQL query is as simple as defining a [GraphQL selector](/docs/recoil-relay/graphql-queries):

```jsx
const userNameQuery = graphQLSelector({
key: 'UserName',
environment: myEnvironment,
query: graphql`
query UserQuery($id: ID!) {
user(id: $id) {
name
}
}
`,
variables: ({get}) => ({id: get(currentIDAtom)}),
mapResponse: data => data.user?.name,
});
```
Then use it like any other Recoil [selector](/docs/introduction/core-concepts#selectors):
```jsx
function MyComponent() {
const userName = useRecoilValue(userNameQuery);
return <span>{userName}</span>;
}
```
Loading