Typed Storage for React Native
- Small wrapper over Async Storage with automatic stringify, parsing
- Note that this library doesn't get you any type safety, all it does is store objects as string, and return the stored string as object
- Defaults to JSON for converting between objects and strings, however allows you to use your own converters
- Run
npm i --save react-native-typed-storage
oryarn add react-native-typed-storage
based on your preference - Import TypedStorage or createTypedStorage from react-native-typed-storage
- WIP More Examples and Docs
Step 1: git clone
this repo:
Step 2: cd to the cloned repo:
Step 3: Install the Application with yarn
- cd to the repo
- Run
yarn build
This project adheres to Standard in TypeScript through tslint-config-standard with custom prettier. Our CI enforces this, so we suggest you enable linting to keep your project compliant during development.
To Lint on Commit
This is implemented using husky. There is no additional setup needed.
Bypass Lint
If you have to bypass lint for a special commit that you will come back and clean (pushing something to a branch etc.) then you can bypass git hooks with adding --no-verify
to your commit command.
Understanding Linting Errors
The linting rules are from JS Standard and React-Standard. Regular JS errors can be found with descriptions here, while React errors and descriptions can be found here.
Please read CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.
Copyright © 2018-2021 Caner Korkmaz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this repository except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 or at LICENSE file.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.