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

doc: Update terminology 'Integrations' to 'Extensions' #2170

Closed
wants to merge 1 commit into from
Closed
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions docs/integrations/scope.mdx → docs/extensions/scope.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ import {
useAtom as useScopedAtom,
} from 'jotai-scope'
import { atom, useAtom } from 'jotai'
import {
Provider as ScopedProvider,
useAtom as useScopedAtom,
} from 'jotai-scope'

const countAtom = atom(0)
const anotherCountAtom = atom(0)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/guides/initialize-atom-on-render.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ This behavior is due to our child components looking for the lowest commmon `Pro

For more information on `Provider` behavior, please read the docs [here](../core/provider.mdx).

For more complex use cases, check out [Scope integration](../integrations/scope.mdx).
For more complex use cases, check out [Scope extension](../extensions/scope.mdx).
6 changes: 3 additions & 3 deletions docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Jotai also includes a `jotai/utils` bundle with a variety of extra utility funct

<TOC section="utilities" />

## Integrations
## Extensions

Jotai has separate bundles for many official integrations including `atomWithQuery` for React Query and `atomWithMachine` for XState, among many others.
Jotai has separate bundles for many official extensions including `atomWithQuery` for React Query and `atomWithMachine` for XState, among many others.

<TOC section="integrations" />
<TOC section="extensions" />

## Tools

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/custom-useatom-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function useSplitAtom(anAtom) {
}
```

### integrations
### extensions

#### useFocusAtom

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes/large-objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const initialData = {

## focusAtom

> `focusAtom` creates a new atom, based on the focus that you pass to it. [jotai-optics](../integrations/optics.mdx#focus-atom)
> `focusAtom` creates a new atom, based on the focus that you pass to it. [jotai-optics](../extensions/optics.mdx#focus-atom)

We use this utility to focus an atom and create an atom from a specific part of the data. For example we may need to consume the people property of the above data, Here's how we do it:

Expand Down
8 changes: 7 additions & 1 deletion website/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ exports.createPages = ({ actions }) => {

createRedirect({
fromPath: `/docs/utils/atom-with-hash`,
toPath: `/docs/integrations/location`,
toPath: `/docs/extensions/location`,
isPermanent: false,
});

Expand All @@ -78,6 +78,12 @@ exports.createPages = ({ actions }) => {
isPermanent: false,
});

createRedirect({
fromPath: `/docs/integrations/*`,
toPath: `/docs/extensions/*`,
isPermanent: true,
});

createRedirect({
fromPath: `/docs/utils/atom-with-reducer`,
toPath: `/docs/utilities/reducer`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { countAtom } from '../atoms/index.js';
import { Button } from '../components/button.js';
import { Code } from '../components/code.js';

export const IntegrationsDemo = () => {
export const ExtensionsDemo = () => {
const [count, setCount] = useAtom(countAtom);

const increment = () => setCount((c) => (c = c + 1));
Expand Down
12 changes: 6 additions & 6 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Code } from '../components/code.js';
import { CoreDemo } from '../components/core-demo.js';
import { Headline } from '../components/headline.js';
import { InlineCode } from '../components/inline-code.js';
import { IntegrationsDemo } from '../components/integrations-demo.js';
import { ExtensionsDemo } from '../components/extensions-demo.js';
import { Intro } from '../components/intro.js';
import { LogoCloud } from '../components/logo-cloud.js';
import { Meta } from '../components/meta.js';
Expand Down Expand Up @@ -88,22 +88,22 @@ const apiTabs = {
<UtilitiesDemo />
</section>
),
Integrations: (
Extensions: (
<section>
<p>
There are also separate packages for each official integration: tRPC, Immer, Query, XState,
URQL, Optics, Relay, location, molecules, cache, and more.
There are also separate packages for each official extension: tRPC, Query, Effect, Immer,
XState, URQL, Optics, Relay, location, molecules, cache, and more.
</p>
<p>
Some integrations provide new atom types with alternate write functions such as{' '}
Some extensions provide new atom types with alternate write functions such as{' '}
<InlineCode>atomWithImmer</InlineCode> (Immer) or <InlineCode>atomWithMachine</InlineCode>{' '}
(XState).
</p>
<p>
Others provide new atom types with two-way data binding such as{' '}
<InlineCode>atomWithLocation</InlineCode> or <InlineCode>atomWithHash</InlineCode>.
</p>
<IntegrationsDemo />
<ExtensionsDemo />
</section>
),
};
Expand Down
2 changes: 1 addition & 1 deletion website/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
{
"source": "/docs/utils/atom-with-hash",
"destination": "/docs/integrations/location",
"destination": "/docs/extensions/location",
"permanent": false
},
{
Expand Down