~repos /atoms-state

#js#react#flux

git clone https://pyrossh.dev/repos/atoms-state.git

Simple State management for react


0227c409 pyros2097

4 years ago
update readme
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # atoms
2
2
 
3
- [![Version](https://img.shields.io/npm/v/@pyros2097/atoms?style=flat-square&color=blue)](https://www.npmjs.com/package/atoms-state)
3
+ [![Version](https://img.shields.io/npm/v/atoms-state?style=flat-square&color=blue)](https://www.npmjs.com/package/atoms-state)
4
4
 
5
5
  A simple statemanagement library for react.
6
6
 
@@ -11,7 +11,7 @@ A simple statemanagement library for react.
11
11
  ```js
12
12
  import React from 'react';
13
13
  import ReactDOM from 'react-dom';
14
- import { atom, useAtom } from '@pyros2097/atoms';
14
+ import { atom, useAtom } from 'atoms-state';
15
15
 
16
16
  const countAtom = atom(10);
17
17
  const sumAtom = atom(get => get(countAtom) + 10);
@@ -46,7 +46,7 @@ ReactDOM.render(<Counter />, document.getElementById('root'));
46
46
  ```js
47
47
  import React, { Suspense } from 'react';
48
48
  import ReactDOM from 'react-dom';
49
- import { asyncAtom, useAsyncAtom } from '@pyros2097/atoms';
49
+ import { asyncAtom, useAsyncAtom } from 'atoms-state';
50
50
 
51
51
  const todoAtom = asyncAtom(async ({ id }) => {
52
52
  const res = await fetch(`https://jsonplaceholder.typicode.com/todos/${id}`);