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