petercrona / localstate-react-examples

Examples of Mvstate used with React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Localstate React Examples

Localstate started with React in mind. These examples show how nicely React and Localstate play together. See src/examples for examples. Feel free to add your own through a PR. This whole project is a create-react-app project. Clone the project, do a "npm i" followed by "npm start" and you should have it up and running.

I'd recommend having a look at Counter first. This is kind of the Hello World of Localstate. TicTacToe is a more advanced example to show you a clear separation of view and "business" logic. Checkout is an example of a multi-step form.

When looking at the examples, pay attention to what kind of code you find in the component versus in the model. Note the separation of view and "business" logic.

Cheers, Peter

About

Examples of Mvstate used with React

License:MIT License


Languages

Language:JavaScript 86.9%Language:HTML 6.8%Language:CSS 6.2%