Skip to content

Commit a31a8a2

Browse files
committed
docs(readme.md): polishing touches to docs
1 parent fe82bfe commit a31a8a2

File tree

2 files changed

+42
-31
lines changed

2 files changed

+42
-31
lines changed

README.md

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Jotai DevTools
22

3-
## Features
3+
[![Build Status](https://img.shields.io/github/actions/workflow/status/jotaijs/jotai-devtools/ci.yml?style=flat&colorA=000000&colorB=259e02)](https://github.com/jotaijs/jotai-devtools/actions/workflows/ci.yml)
4+
[![Version](https://img.shields.io/npm/v/jotai-devtools?style=flat&colorA=000000&colorB=259e02)](https://www.npmjs.com/package/jotai-devtools)
5+
6+
## 🚀 Features
47

58
- Debug 🐞 atom values with ease
69
- Out-of-the-box 🔌 support for async/suspendible atoms
@@ -10,21 +13,22 @@
1013
- ✅ Works with Next.js
1114
- ✅ Supports custom `nonce` for CSP
1215
- ✅ Hides private atoms with ability to configure (requires Jotai `>=2.0.3`)
16+
- ✅ Tree-shakable and built for non-production environments
1317

14-
## Preview
18+
## 📺 Preview
1519

1620
<p>
1721
<a href="https://www.npmjs.com/package/jotai-devtools">
1822
<img alt="Jotai DevTools Screenshot" src="./docs/internal/demo-screenshot.png" width="750"/>
1923
</a>
2024
</p>
2125

22-
## Prerequisites
26+
## ☝️ Prerequisites
2327

2428
- Jotai version `>=1.11.0` (highly recommended to use `2.x.x`)
2529
- React version `>=17.0.0`
2630

27-
## Setup
31+
## 📦 Setup
2832

2933
```sh
3034
# yarn
@@ -34,12 +38,16 @@ yarn add jotai-devtools
3438
npm install jotai-devtools --save
3539
```
3640

37-
## UI DevTools
41+
## ✨ UI DevTools
42+
43+
Enhance your development experience with the UI based Jotai DevTool
44+
45+
[![Demo](https://img.shields.io/badge/demo-%F0%9F%9A%80-green?style=flat&colorA=000000&colorB=259e02)](https://codesandbox.io/s/jotai-devtools-demo-k5p12d)
3846

3947
### Babel plugin setup - (Optional but highly recommended)
4048

41-
Use Jotai babel plugins for optimal experience. Full guide is available on
42-
[jotai.org](https://jotai.org/docs/tools/babel)
49+
Use Jotai babel plugins for optimal debugging experience. Find the complete
50+
guide on [jotai.org](https://jotai.org/docs/tools/babel)
4351

4452
Eg.
4553

@@ -56,7 +64,10 @@ Eg.
5664

5765
### Next JS setup
5866

59-
Enable `transpilePackages` for CSS to be imported correctly.
67+
_You may skip this section if you're not using [Next.js](https://nextjs.org)._
68+
69+
Enable `transpilePackages` for the UI CSS and components to be transpiled
70+
correctly.
6071

6172
```ts
6273
// next.config.ts
@@ -70,6 +81,26 @@ const nextConfig = {
7081
module.exports = nextConfig;
7182
```
7283

84+
### Available props
85+
86+
```ts
87+
type DevToolsProps = {
88+
// Defaults to false
89+
isInitialOpen?: boolean;
90+
// pass a custom store
91+
store?: Store;
92+
// Defaults to light
93+
theme?: 'dark' | 'light';
94+
// Custom nonce to allowlist jotai-devtools specific inline styles via CSP
95+
nonce?: string;
96+
options?: {
97+
// Private atoms are used internally in atoms like `atomWithStorage` or `atomWithLocation`, etc. to manage state.
98+
// Defaults to `false`
99+
shouldShowPrivateAtoms?: boolean;
100+
};
101+
};
102+
```
103+
73104
### Provider-less
74105

75106
```tsx
@@ -103,26 +134,6 @@ const App = () => {
103134
};
104135
```
105136

106-
### Available props
107-
108-
```ts
109-
type DevToolsProps = {
110-
// defaults to false
111-
isInitialOpen?: boolean;
112-
// pass a custom store
113-
store?: Store;
114-
// Defaults to light
115-
theme?: 'dark' | 'light';
116-
// Custom nonce to allowlist jotai-devtools specific inline styles via CSP
117-
nonce?: string;
118-
options?: {
119-
// Private atoms are used internally in atoms like `atomWithStorage` or `atomWithLocation`, etc. to manage state.
120-
// Defaults to `false`
121-
shouldShowPrivateAtoms?: boolean;
122-
};
123-
};
124-
```
125-
126137
## Hooks
127138

128139
Detailed documentation is available on

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
},
6262
"repository": {
6363
"type": "git",
64-
"url": "https://github.com/jotai-labs/jotai-devtools.git"
64+
"url": "https://github.com/jotaijs/jotai-devtools.git"
6565
},
6666
"keywords": [
6767
"jotai",
@@ -74,9 +74,9 @@
7474
],
7575
"license": "MIT",
7676
"bugs": {
77-
"url": "https://github.com/jotai-labs/jotai-devtools/issues"
77+
"url": "https://github.com/jotaijs/jotai-devtools/issues"
7878
},
79-
"homepage": "https://github.com/jotai-labs/jotai-devtools",
79+
"homepage": "https://github.com/jotaijs/jotai-devtools",
8080
"engines": {
8181
"node": ">=14.0.0"
8282
},

0 commit comments

Comments
 (0)