Posts

Showing posts with the label Create-React-App

Create React App with Mobx in Typescript

Create React App with Mobx in Typescript I have been using state management frameworks for the past few years, mainly with Angular and NGRX . Today we will see how we can get started with Create-React-App using Mobx as a state management system. Bootstrap a fresh application Create components Create an observable state / store Create observers components 1. Bootstrap a fresh application Start by installing the latest version of NPM then use npx to setup a fresh project. npx create-react-app my-app --typescript Then navigate to /my-app and run npm start . This will start the application in a development server with a live reload. The command run by npm start is defined under package.json scripts > start and runs react-scripts start . cd my-app npm start The application should now build and run properly and any changes done on the application should be reflected on the browser. We now have all the necessary tool to start writing code in React. 2. Create component...