React – Learning path

This post is to track and record my learning of react and use it after some time.

Making some baby steps to learn react.

Here I will be document something related to it.

Basically I’m going to learn about React components, JSX syntax, Forms.

I have good amount knowledge and experience with angular. Now its time do some real learning and experiment in React. Lets do this.

For anyone who are new to React should have some basic understanding about the JavaScript and Web Development.

What is React?

React is a free and open-source front-end JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications.

It focuses on providing rendering and event handling functionalities.

Dev Environment Setup

We need npm installed in our machine. And then we can install the create-react-app

Or if we already have nodejs installed. We can directly run following command to install the package.

npx create-react-app hello-world
cd hello-world
npm start

(npx comes with npm 5.2+ and higher)

It will install create-react-app and create a skeleton app with name hello-world.

After npm start in source folder

Its shows the following screen

Getting Started

…. to be continued

Minimalism in programming

Minimalism is the new dope in the real world.

Here is the few minimalist approach you can follow in the world of programming.

DRY – don’t repeat yourself

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

KISS – Keep it simple, stupid

The simplest explanation tends to be the right one.

Yagni – You Aren’t Gonna Need It

The art of saying No. Don’t build everything customer/manager ask. Think more than twice and analyse before building a feature & importance of its existence.

Break the number of lines

Break the number of lines in coding when it exceeds N number of characters (mostly to fit in small or medium size screens).

Use access specifiers

Use access specifiers public or private whenever applicable – to avoid unnecessary flow of data here and there.

Naming Conventions

Do proper naming for class, method or variables. Prepare standard naming conventions which suits you.

Version Control System

Choose the right version control if you are doing collaborative work.

Don’t comment the unused code

Don’t comment out any code for future reference – just delete it – if have version control, you can get at any point of time. Or tag the commit for quick access.

Make Abstraction

Reuse the component if possible. Don’t copy paste the entire method just to change one section of the code. Think how you can handle it.

To get latest updates you can follow or subscribe! #peace