Pro REFACT for REACT

Creating applications that work is easy, but developing applications that scale is challenging.

Focus not only on designing and developing a User Interface But also on designing and developing your Codebase.

1. Creating components the better way

Directory Structure
First way
Second way
Earlier
Current

2. Reducing the number of import statements

3. Destructure your props

const user = { 
name: "Alok Sharma",
age: 21
}
console.log(user.name, user.age);
const { name, age} = user;
console.log(name, age);

4. Use SCSS/CSS Modules

1st Way
{ 
modal: "modal",
button: "button",
}
<div className={classes.modal}></div>
import { modal, button } from "./index.module.css";

Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store