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: typo in some files #1269

Merged
merged 15 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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