Brew-Brew / react-by-sample

Set of basic React + Typescript guided samples, cover basic principles of this technology.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Typescript by sample

The goal of this project is to provide a set of step by step guided samples, covering core concepts of React (props, state, replace, cycle...).

Topics covered:

  • Creating a basic starting point from scratch.
  • Basics creating components and managing with props.
  • Managing State plus callbacks.
  • Playing with currified functions.
  • Displaying tabular data.
  • Controlling render lifecycle.
  • Routing.
  • Managing form + validations
  • Next context api.
  • Creating High order components.

Contributors and reviewers are more than welcome.

To get started:

  1. Install NodeJS.
  2. Download this repo.
  3. Open the command line of your choice and cd to the root directory of this repo on your machine, then cd to one of the demos projects.
  4. Install the required packages - npm install.
  5. Builds the project and launch a lite dev web server - npm start.
  6. Navigate to http://localhost:8080/ if your browser doesn't open automatically.

samples

Bundling + npm start based on webpack.

Hello world, simples react render sample.

Introduce a basic React concept, handling properties.

Introduce a basic React concept, handling State.

Using callbacks.

Refactor the job done.

Remove state from a child control just to have clear governance of state.

Enable/disable components.

Simple color picker demo (show how properties work).

ColorPicker refactor.

Implementation of a single sidebar.

Render a table and use a child component to render each row.

Using Promises.

Enhance rendering performance hooking to 'shouldComponentUpdate'.

React Router navigation example.

Basic implementation of a login page.

React Form validation, using lc-form-validation library

How to use React 16 context api.

High Order component sample..

Learn how use render props in React

Play with the Error Boundary concept

Play with the Error Boundary concept make use of hooks a cool concept introduced in React 16.7.0

Let's see how this is solved using Hooks + Use Context.

About Lemoncode

We are a team of long-term experienced freelance developers, established as a group in 2010. We specialize in Front End technologies and .NET. Click here to get more info about us.

For the LATAM/Spanish audience we are running an Online Front End Master degree, more info: http://lemoncode.net/master-frontend

About

Set of basic React + Typescript guided samples, cover basic principles of this technology.

License:MIT License


Languages

Language:TypeScript 69.0%Language:JavaScript 26.1%Language:HTML 3.9%Language:CSS 1.0%