From da63a47f4ef644d328265fb952bcb8c16e6355c2 Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:16:11 +0430 Subject: [PATCH 1/8] docs: typo in atom-with-storage.mdx 1) Fixed typo "retreiving" to "retrieving". 2) Fixed typo "retreival" to "retrieval". --- docs/utils/atom-with-storage.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/utils/atom-with-storage.mdx b/docs/utils/atom-with-storage.mdx index a7c3e81ce8..4b872276f9 100644 --- a/docs/utils/atom-with-storage.mdx +++ b/docs/utils/atom-with-storage.mdx @@ -32,7 +32,7 @@ The `atomWithStorage` function creates an atom with a value persisted in `localS **storage** (optional): an object with: -- `getItem` and `setItem` methods for storing/retreiving persisted state; defaults to using `localStorage` for storage/retreival and `JSON.stringify()`/`JSON.parse()` for serialization/deserialization. +- `getItem` and `setItem` methods for storing/retrieving persisted state; defaults to using `localStorage` for storage/retrieval and `JSON.stringify()`/`JSON.parse()` for serialization/deserialization. - Optionally, the storage has a `subscribe` property, which can be used to synchronize storage. The default `localStorage` handles `storage` events for cross-tab synchronization. - Optionally, the storage has a `delayInit` (`boolean`) property, which can be used to tell jotai whether to use Suspense - `delayInit: true` will not suspend when first reading the value of your atom From a1e29b47230286dda0227eb39b57c7d15058519c Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:22:21 +0430 Subject: [PATCH 2/8] docs: typo in query.mdx Fixed typo "gastby" to "Gatsby". --- docs/integrations/query.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/query.mdx b/docs/integrations/query.mdx index 1dce51954e..f8b0dc1b56 100644 --- a/docs/integrations/query.mdx +++ b/docs/integrations/query.mdx @@ -94,7 +94,7 @@ const UserData = () => { ### SSR support -Both atoms can be used within the context of a server side rendered app, such as a next.js app or gastby app. You can [use both options](https://react-query.tanstack.com/guides/ssr) that React Query supports for use within SSR apps, [hydration](https://react-query.tanstack.com/guides/ssr#using-hydration) or [`initialData`](https://react-query.tanstack.com/guides/ssr#using-initialdata). +Both atoms can be used within the context of a server side rendered app, such as a next.js app or Gatsby app. You can [use both options](https://react-query.tanstack.com/guides/ssr) that React Query supports for use within SSR apps, [hydration](https://react-query.tanstack.com/guides/ssr#using-hydration) or [`initialData`](https://react-query.tanstack.com/guides/ssr#using-initialdata). ### Examples From 2a57567a104bbdff2bb6e7399e4f8f69557d769e Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:25:05 +0430 Subject: [PATCH 3/8] docs: typo in async.mdx Fixed typo "seperate" to "separate". --- docs/guides/async.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/async.mdx b/docs/guides/async.mdx index 7f8717f678..737e34b2fb 100644 --- a/docs/guides/async.mdx +++ b/docs/guides/async.mdx @@ -6,7 +6,7 @@ nav: 1.03 Using async atoms, you gain access to real-world data while still managing them directly from your atoms and with incredible ease. -We can seperate them in two main categories: +We can separate them in two main categories: - Async read atoms: async request is started instantly as soon as you try to get its value, you could relate to them as "smart getters" - Async write atoms: async request is started at a specific moment, you could relate to them as "actions" From 3230a3ddb9eaee2f5c0b1164a306d182b30f7dd0 Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:27:36 +0430 Subject: [PATCH 4/8] docs: typo in core-internals.mdx Fixed typo "recursivly" to "recursively". --- docs/guides/core-internals.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guides/core-internals.mdx b/docs/guides/core-internals.mdx index 6d44653f51..a75f5906fa 100644 --- a/docs/guides/core-internals.mdx +++ b/docs/guides/core-internals.mdx @@ -142,7 +142,7 @@ const getAtomState = (atom) => { // If atom is primitive, we return it's value. // If atom is derived, we read the parent atom's value -// and add current atom to parent's the dependent set (recursivly). +// and add current atom to parent's the dependent set (recursively). const readAtom = (atom) => { const atomState = getAtomState(atom) const get = (a) => { @@ -158,7 +158,7 @@ const readAtom = (atom) => { return value } -// if atomState is modified, we need to notify all the dependent atoms (recursivly) +// if atomState is modified, we need to notify all the dependent atoms (recursively) // now run callbacks for all the components that are dependent on this atom const notify = (atom) => { const atomState = getAtomState(atom) @@ -179,7 +179,7 @@ const writeAtom = (atom, value) => { } // if 'a' is the same as atom, update the value, notify that atom and return - // else calls writeAtom for 'a' (recursivly) + // else calls writeAtom for 'a' (recursively) const set = (a, v) => { if (a === atom) { atomState.value = v From cdec29b436842d6057f951d6d61b0cee2981d16e Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:30:02 +0430 Subject: [PATCH 5/8] docs: typo in debugging.mdx Fixed typo "dependants" to "dependents". --- docs/guides/debugging.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/debugging.mdx b/docs/guides/debugging.mdx index 15cef396c0..bdfb2cb745 100644 --- a/docs/guides/debugging.mdx +++ b/docs/guides/debugging.mdx @@ -103,7 +103,7 @@ This would set the `countAtoms`'s value to `5`. We'd recommend this hook if you want to keep track of all of your atoms in one place. It means every action on every atom that is placed in the bottom of this hook (in the React tree) will be catched by the Redux Dev Tools. -Every feature of `useAtomDevtools` is supported in this hook, but there's an extra feature, which includes giving more information about atoms dependants like: +Every feature of `useAtomDevtools` is supported in this hook, but there's an extra feature, which includes giving more information about atoms dependents like: ```json { From 2fd21e6b94a74658af36436a96e3d4360ba88d38 Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:33:50 +0430 Subject: [PATCH 6/8] docs: typo in testing.mdx Fixed typo "limmited" to "limited". --- docs/guides/testing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/testing.mdx b/docs/guides/testing.mdx index 4876ece35e..b35a1890db 100644 --- a/docs/guides/testing.mdx +++ b/docs/guides/testing.mdx @@ -54,7 +54,7 @@ test('should increment counter', () => { ## Injected Values You may want to inject arbitrary values to your atom before starting some tests. -Maybe the counter should be limmited to 100. Let's see how to test that it doesn't increase after reaching 100. +Maybe the counter should be limited to 100. Let's see how to test that it doesn't increase after reaching 100. In order to do that, simply use a [Provider](..api/core#provider), and export your atom to be filled-in. ```tsx From e7ce1f58955661a852e63549fb1e52c1c8e14f76 Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:36:00 +0430 Subject: [PATCH 7/8] docs: typo in babel.mdx Fixed typo "identifer" to "identifier". --- docs/api/babel.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/babel.mdx b/docs/api/babel.mdx index ceb75baf46..161f59796b 100644 --- a/docs/api/babel.mdx +++ b/docs/api/babel.mdx @@ -10,7 +10,7 @@ Jotai is based on object references and not keys (like Recoil). This means there However, this can quickly become cumbersome to add a `debugLabel` to every atom. -This `babel` plugin adds a `debugLabel` to every atom, based on its identifer. +This `babel` plugin adds a `debugLabel` to every atom, based on its identifier. The plugin transforms this code: From 7eec7d4a2c5549eb767330065c7fe837744d195f Mon Sep 17 00:00:00 2001 From: Sepehr Safari Date: Sun, 3 Jul 2022 17:42:18 +0430 Subject: [PATCH 8/8] docs: typo in utils.mdx Fixed typo "embeded" to "embedded" --- docs/api/utils.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/utils.mdx b/docs/api/utils.mdx index 9e38d9f36c..fa705c92db 100644 --- a/docs/api/utils.mdx +++ b/docs/api/utils.mdx @@ -42,7 +42,7 @@ This is an overview of the atom creators/hooks utilities that can be found under 9. [atomWithReducer](../utils/atom-with-reducer.mdx) - This is a function to create an atom with an embeded reducer function to update the value. + This is a function to create an atom with an embedded reducer function to update the value. 10. [atomWithDefault](../utils/atom-with-default.mdx)