The goal of this project is to provide a set of simple samples, providing and step by step guide to start working with React and Typescript. Characteristics:
- Bundling based on webpack.
- React + Typescript based.
- Simple navigation using react-router.
- Managing async calls and updates.
- Using Redux library (not available yet on hooks version, coming soon).
- Handling async calls via Redux-Thunk + Redux Saga (not available yet on hooks version, coming soon)
- Adding unit testing support (not available yet on hooks version, coming soon).
- Implementing Lazy Loading (not available yet on hooks version, coming soon).
- ...
- Install NodeJS
- Download this repo
- Open the command line of your choice and cd to a sample directory within this repo on your machine
npm install
- Installs packagesnpm start
- Builds the project and launch a lite web server (webpack-dev-server).- Navigate to http://localhost:8080/ if your browser doesn't open automatically.
Starting from sample 14, learn how React 16 context api works.
Bundling + npm start based on webpack.
Hello world, simples react render sample.
Creating a common header and about page react components.
Creating a "members" page, adding navigation using react-router.
Create a read only list component (table >> tr >> td), reading list of members from a fake api and dumping it into component state.
Breaking the list component into two: list and row compomenent, member row entity passed via props.
Members fake api replaced with async call to api github to retrieve list of members of a given organization.
In this sample we will add a link in the members page that will navigate to a "new member page". This new page will display a form where you have to enter the avatar url, login and id of a new member (just supossing we can edit that info).
Edit a given member, here we learn how to add params to a navigation link and how to obtain them from a component.
Validation performed so far:
- Login: required, must be a string (at least length 3).
Added Redux support, isolated state into Redux reducers, implement load, save, basic validation cycle. This sample uses the fake api, in following samples we will call async operations and fitting them into Redux architecture.
Display a busy indicator while an ajax request is in progress.
Sample updated using Jest.
Sample updated using Jest.
Pending update Jest + Enzyme
Pending update
Pending update
Pending update
Pending update
Replace class components by stateless components using Hooks.
Add a login page using Material-UI.