Skip to content

Commit 975d4e4

Browse files
committed
chore: change package name
1 parent 413fdb4 commit 975d4e4

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# ReAtom
1+
# AtomSphere
22

33
An atomic state management library for React.
44

5-
ReAtom is very similar to [Jotai](https://jotai.org/) but with a slightly different API. It lets you create `Atoms` and use them in your React components.
5+
AtomSphere is very similar to [Jotai](https://jotai.org/) but with a slightly different API. It lets you create `Atoms` and use them in your React components.
66

77
When using atoms, you get a fine-grained reactivity system that only updates the components that depend on the atom that changed
88
(as opposed to the traditional React context system, which re-renders all the components under the context when the state changes).
@@ -14,7 +14,7 @@ You can create an atom using the `atom` function, and read it using the `useAtom
1414

1515
```tsx
1616
// Counter.tsx
17-
import { atom, useAtom } from 'reatom';
17+
import { atom, useAtom } from 'atomsphere';
1818

1919
const countAtom = atom(0);
2020

@@ -36,15 +36,15 @@ if you want, you can create your atoms in a separate file and import them in mul
3636

3737
```ts
3838
// atoms.ts
39-
import { atom } from 'reatom';
39+
import { atom } from 'atomsphere';
4040

4141
export const countAtom = atom(0);
4242
export const nameAtom = atom('John Doe');
4343
```
4444

4545
```tsx
4646
// Counter.tsx
47-
import { useAtom } from 'reatom';
47+
import { useAtom } from 'atomsphere';
4848
import { countAtom } from './atoms';
4949

5050
function Counter() {
@@ -61,7 +61,7 @@ function Counter() {
6161

6262
```tsx
6363
// Name.tsx
64-
import { useAtom } from 'reatom';
64+
import { useAtom } from 'atomsphere';
6565
import { nameAtom } from './atoms';
6666

6767
function Name() {
@@ -76,14 +76,14 @@ function Name() {
7676
}
7777
```
7878

79-
ReAtom also supports derived atoms, which are atoms that depend on other atoms.
79+
AtomSphere also supports derived atoms, which are atoms that depend on other atoms.
8080

8181
In order to create a derived atom, instead of passing an initial value to the `atom` function, you pass a function that calculates the value of the atom.
8282
You'll receive a `get` function as an argument that will allow you to get the value of other atoms:
8383

8484
```tsx
8585
// Derived.tsx
86-
import { atom, useAtom } from 'reatom';
86+
import { atom, useAtom } from 'atomsphere';
8787

8888
const countAtom = atom(0);
8989
const doubleCountAtom = atom((get) => get(countAtom) * 2);
@@ -104,4 +104,4 @@ function Derived() {
104104

105105
Each time the `countAtom` changes, the `doubleCountAtom` will be recalculated, and the components that depend on it will be updated.
106106

107-
The dependency tracking is done automatically by ReAtom, so you don't have to worry about it.
107+
The dependency tracking is done automatically by AtomSphere, so you don't have to worry about it.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "reatom",
2+
"name": "atomsphere",
33
"description": "An atomic state management library for React",
44
"version": "0.0.1",
55
"author": "StyleShit",
66
"license": "MIT",
77
"repository": {
88
"type": "git",
9-
"url": "https://github.com/StyleShit/reatom"
9+
"url": "git+https://github.com/StyleShit/atomsphere.git"
1010
},
1111
"type": "module",
1212
"main": "dist/index.cjs",

0 commit comments

Comments
 (0)