React: Difference between revisions

From Bitpost wiki
Line 15: Line 15:


* Use ES6 modules, destructuring/spread, functional components
* Use ES6 modules, destructuring/spread, functional components
* Precisely use Promises and async/await to accomplish [https://github.com/moodboom/Reusable/blob/master/JavaScript/scrap/promises.js CHAIN, PARALLEL, and BATCH processing]
* Understand and abide by PROP and STATE best practices
* Understand and abide by PROP and STATE best practices
* Add and remove modules properly using npm rather than editing package*.json
* Add and remove modules properly using npm rather than editing package*.json

Revision as of 19:26, 24 February 2023

React is a medium-sized framework that is a great fit for developing front ends. It combines HTML, JavaScript, (S)CSS into JSX Components that track "props and state". It can increase your website development productivity pretty quickly. Especially with the addition of npm modules, which literally do everything under the Sun. (like, four times over, sadly...)

2023 Metaframework

  • I insist on fully responsive single-page-application websites.
  • I like D3. A lot.
  • I like Bootstrap.
  • I need a production build with polyfill, so I can write modern JavaScript code once and have it work ANYWHERE like magic.
  • I want a production build with minification and tree shaking of module dependencies to minimize my website load time.
  • I like the fastest possible development loop when tweaking the web UI.

With this in mind, I developed a Vite skeleton with all my tools built in.

Patterns

  • Use ES6 modules, destructuring/spread, functional components
  • Precisely use Promises and async/await to accomplish CHAIN, PARALLEL, and BATCH processing
  • Understand and abide by PROP and STATE best practices
  • Add and remove modules properly using npm rather than editing package*.json
npm install # on new environments
npm i --save newly-needed-component
npm i --dev newly-needed-dev-only-component
npm remove no-longer-needed-component