1.1.0 ā€¢ Published 3 years ago

potli v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

šŸ  Homepage

Why?

A super lightweight state management library, that uses Context API and AsyncStorage(local storage for web) behind the scenes to:

  1. Provide an extremely easy to use API.
  2. Retain state even after app kills or browser restarts.
  3. Maintains state app-wide, update your value for a key in one screen and it gets updated in the whole app.

Install

npm i potli

Usage

1. Wrap your app in Store from potli/Store

import Store from 'potli/Store'
...
const App = () => {
  ...
  return (
    <Store>
      // Your app
    <Store>
  );
}

2. Use Anywhere in your app

import Store from 'potli/useStore'
...
const SomeComponent = () => {
  ...
  const {data, setData} = useStore('USER')
  ...
}

Author

šŸ‘¤ seven

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2021 seven.


1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago