BlogApp is a react native appp. In this app, User will be able to create, update and delete blog. We have use json-server and ngrok to store user's blogs. I will explain futher down below.
Main focus is to grip the concepts of useContext hook. We are using json-server and ngrok to store user's blogs. We are using axios to communicate between server and our app. The main focus is to learn basics concepts of React Native.
Download code and one last thing Place jsonserver folder outside the app folder.
In BlogApp folder run:
npm install
In jsonserver folder run:
npm install
- Show list of user blog posts
- Create new blog post
- Update the existing blog post
- Delete the specific blog post
- Store blog posts in local server using json-server and ngrok
You have to run local server in order to show user blogs posts. You have to run json-server and ngrik using terminal.
In order to run json-server server run using this command:
npm run db
in order to run ngrok server will have to run this command:
npm run tunnel
Some changes needed before run the app. you will have to require some changes in jsonServer file.
located in project directory src/api/jsonServer.js
import axios from 'axios';
export default axios.create({
baseURL: 'http://7383-206-84-155-12.ngrok.io/', //insert your ngrok or localhost address
});
After this we can run your app.
If you feel any difficulty regarding setup. Feel free to contact me. I am here to help you.