/react-context-api-experiment

playground to study react with new context API

Primary LanguageJavaScript

React Context API experiment

This project was bootstrapped with Create React App, as a clone of ortense/react-redux-experiment to compare Redux and Context in a simples use case.

Folder Structure

After creation, your project should look like this:

my-app/
  README.md
  node_modules/
  package.json
  public/
    index.html
    favicon.ico
  src/
    components/
    store/
    App.css
    App.js
    App.test.js
    index.css
    index.js
    logo.svg

For the project to build, these files must exist with exact filenames:

  • public/index.html is the page template;
  • src/index.js is the JavaScript entry point.
  • src/components is the steteless components
  • src/store is the store created with context api

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.