What Makes a React Project?

     My first step into the world of React is complete! I concluded a fantastic PluralSight course by Samer Buna, which concluded by teaching me the most important steps to creating a React project from scratch. Previously I had built my projects with a simple command that would build me a generic app (npx create-react-app), but I think it's important to know the different libraries that really make your project work. I wanted to mention some of the more important components of a React project.

1. React and ReactDom          

    React is not really a framework, I said it was in an earlier post but I'm smarter now. It's a library, which makes it really lightweight. All you are really doing is writing JavaScript, and the React and ReactDOM libraries give you a way to build reusable components that can pass and receive data.

2. ESLint

     For me, one of the most frustrating things about working in JavaScript is the lack of errors and the difficulty of debugging. ESLint helps, although it's not perfect. ESLint is just a linter, it'll spot check your code to make sure you aren't missing any semicolons and yell at you when you write a an if statement and haven't written the last } yet.

    ESLint works really well with another library called Prettier, which will format your code to fit standards. If you use tab instead of spaces, it'll correct your code. It happens automatically, as soon as you save. ESLint will tell you there's a problem, and Prettier will fix it. A match made in heaven.

3. Babel 

     Babel is pretty common to any JavaScript 'framework', it makes your code backwards-compatible with older versions of JavaScript in older browsers. It ensure that the code you write will work on nearly any browser, in many different environments. Babel is more of a necessity these days, but it's important to know what it does.

     There are plenty of other great libraries to use, I am partial to Axios for making API requests for example. 

Comments

Popular posts from this blog

API's in C#

Using WebRTC to build a videophone in React and TypeScript

Reviewing WPF and MVVM