Skip to content

Commit

Permalink
docs: typo in some files (pmndrs#1269)
Browse files Browse the repository at this point in the history
* docs: typo in atom-with-storage.mdx

1) Fixed typo "retreiving" to "retrieving".
2) Fixed typo "retreival" to "retrieval".

* docs: typo in query.mdx

Fixed typo "gastby" to "Gatsby".

* docs: typo in async.mdx

Fixed typo "seperate" to "separate".

* docs: typo in core-internals.mdx

Fixed typo "recursivly" to "recursively".

* docs: typo in debugging.mdx

Fixed typo "dependants" to "dependents".

* docs: typo in testing.mdx

Fixed typo "limmited" to "limited".

* docs: typo in babel.mdx

Fixed typo "identifer" to "identifier".

* docs: typo in utils.mdx

Fixed typo "embeded" to "embedded"
  • Loading branch information
sepehr-safari authored Jul 4, 2022
1 parent 20c396f commit 4abe6f3
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/api/babel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/utils.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/async.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/core-internals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/utils/atom-with-storage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4abe6f3

Please sign in to comment.