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

chore(docs): show only npm install #2325

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/extensions/cache.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ a third-party library to help such use cases.
### Install

```
yarn add jotai-cache
npm i jotai-cache
```

## atomWithCache
Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/effect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords: effect, atom effect, side effect, side-effect, sideeffect
## install

```
yarn add jotai-effect
npm i jotai-effect
```

## atomEffect
Expand Down
8 changes: 4 additions & 4 deletions docs/extensions/immer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ keywords: immer

### Install

You have to install `immer` and `jotai-immer` to use this feature.
You have to install `immer` and `jotai-immer` to use this feature, with your preferred package manager.

```
npm install immer jotai-immer
# or
yarn add immer jotai-immer
npm i immer jotai-immer
```

## atomWithImmer
Expand Down Expand Up @@ -109,6 +107,8 @@ const Controls = () => {

It would be better if you don't use `withImmer` and `atomWithImmer` with `useImmerAtom` because they provide the immer-like `writeFunction` and we don't need to create a new one.

You can use `useSetImmerAtom` if you need only the setter part of `useImmerAtom`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New feature in jotai-immer v0.3.0.


### Examples

Check this example with useImmerAtom:
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/location.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ To deal with `window.location`, we have some functions to create atoms.

### Install

You have to install `jotai-location` to use this feature.
You have to install `jotai-location` to use this feature, with your preferred package manager.

```
yarn add jotai-location
npm i jotai-location
```

## atomWithLocation
Expand Down
6 changes: 2 additions & 4 deletions docs/extensions/optics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ keywords: optics

### Install

You have to install `optics-ts` and `jotai-optics` to use this feature.
You have to install `optics-ts` and `jotai-optics` to use this feature, with your preferred package manager.

```
npm install optics-ts jotai-optics
# or
yarn add optics-ts jotai-optics
npm i optics-ts jotai-optics
```

## focusAtom
Expand Down
10 changes: 3 additions & 7 deletions docs/extensions/query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jotai-tanstack-query currently supports TanStack Query v5.

### Install

In addition to `jotai`, you have to install `jotai-tanstack-query`, `@tanstack/query-core` and `wonka` to use the extension.
In addition to `jotai`, you have to install `jotai-tanstack-query`, `@tanstack/query-core` and `wonka` to use the extension, with your preferred package manager.

```bash
yarn add jotai-tanstack-query @tanstack/query-core wonka
npm i jotai-tanstack-query @tanstack/query-core wonka
```

### Incremental Adoption
Expand Down Expand Up @@ -339,11 +339,7 @@ See [a working example](https://codesandbox.io/s/4gfp6z) to learn more.
In order to use the Devtools, you need to install it additionally.

```bash
$ npm i @tanstack/react-query-devtools
# or
$ pnpm add @tanstack/react-query-devtools
# or
$ yarn add @tanstack/react-query-devtools
npm i @tanstack/react-query-devtools
```

All you have to do is put the `<ReactQueryDevtools />` within `<QueryClientProvider />`.
Expand Down
6 changes: 2 additions & 4 deletions docs/extensions/redux.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ and sync with atoms in Jotai.

### Install

You have to install `redux` and `jotai-redux` to use this feature.
You have to install `redux` and `jotai-redux` to use this feature, with your preferred package manager.

```
npm install redux jotai-redux
# or
yarn add redux jotai-redux
npm i redux jotai-redux
```

## atomWithStore
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/relay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ You can use Jotai with [Relay](https://relay.dev).

### Install

You have to install `jotai-relay` and `relay-runtime`.
You have to install `jotai-relay` and `relay-runtime`, with your preferred package manager.

```
yarn add jotai-relay relay-runtime
npm i jotai-relay relay-runtime
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/scope.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and the use of those atoms is scoped within the subtree.
### Install

```
yarn add jotai-scope
npm i jotai-scope
```

### Counter Example
Expand Down Expand Up @@ -105,7 +105,7 @@ See [Motivation](https://github.com/saasquatch/bunshi/tree/v1.1.1#motivation) fo
### Install

```
yarn add bunshi
npm i bunshi
```

### Counter Example
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/trpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ You can use Jotai with [tRPC](https://trpc.io).

### Install

You have to install `jotai-trpc`, `@trpc/client` and `@trpc/server` to use the extension.
You have to install `jotai-trpc`, `@trpc/client` and `@trpc/server` to use the extension, with your preferred package manager.

```
yarn add jotai-trpc @trpc/client @trpc/server
npm i jotai-trpc @trpc/client @trpc/server
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/urql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ From the [Overview docs](https://formidable.com/open-source/urql/docs/):

### Install

You have to install `jotai-urql`, `@urql/core` and `wonka` to use the extension.
You have to install `jotai-urql`, `@urql/core` and `wonka` to use the extension, with your preferred package manager.

```
yarn add jotai-urql @urql/core wonka
npm i jotai-urql @urql/core wonka
```

### Exported functions
Expand Down
6 changes: 2 additions & 4 deletions docs/extensions/valtio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ This only uses the vanilla api of valtio.

### Install

You have to install `valtio` and `jotai-valtio` to use this feature.
You have to install `valtio` and `jotai-valtio` to use this feature, with your preferred package manager.

```
npm install valtio jotai-valtio
# or
yarn add valtio jotai-valtio
npm i valtio jotai-valtio
```

## atomWithProxy
Expand Down
6 changes: 2 additions & 4 deletions docs/extensions/xstate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ a better and safer abstraction for state management.

### Install

You have to install `xstate` and `jotai-xstate` to use this feature.
You have to install `xstate` and `jotai-xstate` to use this feature, with your preferred package manager.

```
npm install xstate jotai-xstate
# or
yarn add xstate jotai-xstate
npm i xstate jotai-xstate
```

## atomWithMachine
Expand Down
6 changes: 2 additions & 4 deletions docs/extensions/zustand.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ This only uses the vanilla api of zustand.

### Install

You have to install `zustand` and `jotai-zustand` to use this feature.
You have to install `zustand` and `jotai-zustand` to use this feature, with your preferred package manager.

```
npm install zustand jotai-zustand
# or
yarn add zustand jotai-zustand
npm i zustand jotai-zustand
```

## atomWithStore
Expand Down
2 changes: 0 additions & 2 deletions docs/guides/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ Jotai provides SWC plugins for better DX while developing with Next.js. [Find mo

```bash
npx create-next-app --example with-jotai with-jotai-app
# or
yarn create next-app --example with-jotai with-jotai-app
```

Here's a [link](https://github.com/vercel/next.js/tree/canary/examples/with-jotai).
8 changes: 2 additions & 6 deletions docs/tools/devtools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ keywords: devtools,debug,snapshot

### Install

Install `jotai-devtools` to your project to get started
Install `jotai-devtools` to your project to get started with your preferred package manager.

```sh
# yarn
yarn add jotai-devtools @emotion/react

# npm
npm install jotai-devtools @emotion/react --save
npm i jotai-devtools @emotion/react
```

### Notes
Expand Down
Loading