Code Monkey home page Code Monkey logo

react-native-redux-mysql-crud's Introduction

Complete "CRUD" via Redux and Redux-Thunk, React-Native.

This repository will provide all the information required for the implementation of MySQL CRUD with Redux and Thunk in easiest way.

Description:

  • Well Redux and Rudux-Thunk both are used for "state management" of App level, normally we are dealing with components in react-native and we do state management at component level.

  • As long as you are dealing with small startup apps, one may not feel the use of redux in the project but on the large scale projects the complexity of the state management increases as the project grows bigger, here you may need redux as a best tool to ease the complexity.

  • Befor we move on for the explanation of the project, I may recommend to study a bit about prerequisites of the Redux and Redux-thunk as this will help you to understand it very easily.

  • note : that if you get "index out of Range Error" so you need to go to actions of the redux and update your network ip address in the fetch function. file name: (mysql_Actions)

files

  • Components Folder ..... Includes all files of the project.
  • Redux Folder ........ Includes Redux Actions and Reducers.
  • Routes Folder ........Includes the React-Native-Router-Flux Scenes for navigation.
  • Scenes Folder ........Includes the Screens (initial screen & update screen)
  • MySQLDatabase Folder ........ Includes all the php files which will provide server side response.
  • DataCollection.sql ..... Includes the database that should to be imported.

Steps:

  1. First Install two libraries using npm modes (Redux and React-Redux).
  • Run the following command on terminal.. npm install --save redux react-redux
  • (react-redux has been used for the connection of redux and react-native)
  • Remember you can add "components folder" inside your project which will help you to integrate the project in ease mode.
  1. After installation import both libraries into your app.js file as given in the repository.
  2. Create store and wrap it with provider.
  3. Now install redux thunk.. type the following command to get redux-thunk.. npm install redux-thunk
  4. Rudux thunk works as a middleware so apply the middleware to the store in app.js file.
  5. After all these steps make a seperate folder for the Redux and add two more folders as Actions & Reducers, add related files given in the repository.
  6. Find out your network ip-address and change the link in the fetch api that has been used in the Action files, provide your own directory location in order to make proper sync.
  7. Remember it includes files of php which works on server side so you have to download xampp or wampp to get phpmyadmin and in the htdocs folder of the xampp you have to add your whole project so then everything will work accurately.
  8. DataCollection.sql file is given, which you can import into your localhost/phpmyadmin which will help you in connectivity with mysql, as the code is already synced with it.

Good Luck !

1234

react-native-redux-mysql-crud's People

Contributors

sabaoonbedar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.