/RN-BlogPost-hooks-API

It is a simple BlogPost app made on react-native. To maintain a state and perform all CRUD operations i used a react hooks API. Inside this i used useState, useReducer and useContext API.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

BlogPost-reactnative-hooks-API

It is a simple BlogPost app made on react-native. To maintain a state and perform all CRUD operations i used a react hooks API. Inside this i used useState, useReducer and useContext API.

Status License Coffee

forthebadge forthebadge forthebadge forthebadge

Hooks

Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class. React with Hooks Video (https://youtu.be/dpw9EHDh2bM)

List of all Hooks functions

All used in this project

  1. useState
  2. useReducer
  3. useContext

How to setup?

Below setup is only work for master branch.

  1. Download a .zip file of repository.
  2. Extract the BlogPost-reactnative-hooks-API-master.zip file
  3. Open Extracted folder in your favorite IDE. (Atom, VisualStudioCode, Sublime)
  4. Open command prompt in windows press ⌃R OR open terminal in MacOS.
  5. go to BlogPost-reactnative-hooks-API-master project directory
  6. Execute command npm install.
  7. Before writing this command make sure you have preinstalled Expo CLI QuickStart in your machine.
  8. If not follow guide (https://facebook.github.io/react-native/docs/getting-started)
  9. After all this execute command npm start
  10. It will start Metro builder in your browser
  11. When you see Tunnel ready log in your metro builder connect device OR open simulator for macOS or emulator for Windows.
  12. press a to run in android OR i to run in ios in command prompt.
  13. And woila All done...! 😄

Support Development ☕

Buy me a coffee ☕

License

Copyright 2020 Dilip Suthar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

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.