Sample code to get started with React Redux and Sagas.
Please ensure you install node via NVM as listed in the pre-requisites, otherwise you could run into permission issues.
To get started, the places to look first are:
src/main.js
: Main entry point for your react app for running in isolation (when usingnpm run dev
)public/index.html
: Standard HTML file for testing in isolation, which your react app will run insrc/index.js
: The main export point for the name, container component and store (when integrating with cb-host and doingnpm publish
)src/containers/TemplateContainer.js
: The main container component that will connect your redux store with your react componentssrc/components
: Your react components (should not useconnect
from redux with these ones, leave that to the container)src/reducers
: Reducers handle updates to the store data via actionssrc/actions
: Events that are handled by reducers to update the storesrc/services
: The ajax request handlers for talking to the apisrc/sagas
: The sagas that connect API requests with the Redux store
If you're developing on this starter kit, this functions just like any module, but comes with a really simple fake "racing page" POC app to test stuff with. If you add things to this starter kit, it is highly recommended that you also update the example app to make use of the addition in some simple way. If you're developing a module from this starter kit, here are the commands available to you:
npm install
npm start
Open your browser and load http://127.0.0.1:3000
npm run test:watch
npm run docs
npm run purge