This is a practice project for anyone who wants to come up to speed with the basics of React/Redux. It includes a Python server component to provide a simple backend.
This project skeleton should provide all of the infrastructure necessary to get up and running with React/Redux. It has a working build system (webpack + babel), it includes a simple setup script to install the requirements (note: only works for conda right now), and it has the basic wiring of the infrastructure necessary to get your feet wet building a user interface with React.
- First, install anaconda
- After the installation, you'll need to make sure you've got conda on your path.
which conda
should return something like "~/anaconda2/bin/conda"; if you just installed conda, try starting a new bash session (new terminal window /bash
will do the trick) to get the .bash_profile/.bashrc changes from the installer to apply. - Fork this repository on GitHub
- Clone the repo to your machine:
git clone [email protected]:YOUR_USERNAME/react_practice
cd
into the project's directorybash setup.sh
should install the dependencies for the project
First, you'll need to activate the conda environment:
source activate react_practice
Then, to run the development server (which will automatically watch your source code and rebuild immediately):
npm run dev
and open a browser to localhost:5000. You should be greeted with a very simple page.
- Build a container and the necessary widgets to display the To Do list and replace the existing HTML in the RootContainer with it. You should pass in the array of to-dos from the RootContainer.
- Provide a way for users to add a new To-Do
- Provide a way for users to complete a To-Do
- Provide a way for users to edit the task of a To-Do
- Provide a way for users to remove a To-Do (Note: this will require editing the server and adding a new endpoint, as well as interacting with the Redux parts of the application directly)
React Bootstrap; You should use this library's utilities for the user interface. React; this is handy for reference. Understanding the lifecycle of a react component is very, very useful. Redux; you hopefully shouldn't need this one, but it's a good read and helps communicate some of the ideas behind the library. Flask This is the library used for hosting the web application. You can learn a bit more about the specifics if you like, or you can just copy the example code I've provided and edit it to suit your needs.