When released, React 18 will include improvements (Automatic Batch Processing), new API (start Transition), and a new streaming server renderer with built-in support for React.lazy.
These features are made possible by a new registration mechanism we’re adding in React 18. It’s called “concurrent rendering” and allows React to prepare multiple versions of the UI simultaneously. This change is mostly behind the scenes, but it opens up new possibilities to improve actual performance.
I will talk about these new features in more detail in my next articles.
Follow me ;) ………..
When we build React apps for the web, we need to use a router to view the pages and navigate around them. Therefore, we are going to see the most popular router for React applications — React Router.
The first step to using React Router is to install the package. These are three different packages: React Router, React Router DOM, and React Router Native. The difference between them lies in their use. React Router DOM is for web apps and React Router Native is for mobile apps built with React Native.
npm install react-router-dom
Once it’s installed we can bring…
You declare routes inside the
Switch component, the previous component is unmounted and the component with the new matching route is mounted.
If you need to persist some data across a route change, you need to declare it in the component which encapsulates the routes, or some other way of persisting data like using local storage
Whenever you declare some state inside a class-based component, it’s always an object, Since state is an object,
prevState is also an object. But when you’re using functional components with React Hooks, the state can be an object or a non-object value.
If you need a more maintainable and secure code. the DotEnv package allows you to offset your environment variables more easily and simpler to use with Node.
DotEnv is a lightweight npm package that automatically loads environment variables from an .env file into the process.envobject.
Create a file called .env at the top level of your file structure. This is where you will create all your environment variables, written in NAME = value format. like this: PORT = 5000.
The variables are attached to the process.env object, so you can access them using the process.env.KEY template.
To modify the value…
below are the most used GIT command lines:
git config --global user.name "your_username"wgit config --global user.email "firstname.lastname@example.org"git config --global --list
--global option tells Git to always use this information for anything you do on your system. If you omit
--global or use
--local, the configuration is applied only to the current repository.
git clone <repository path>
git remote add.
git remote -v
git checkout -b <name-of-branch>
git checkout master
git checkout <name-of-branch>
git add <file-name OR folder-name>
git commit -m "COMMENT TO DESCRIBE THE INTENTION OF THE…
solid state device or solid state disk
After having had bad user experience with HDD or hard disk drives due to their mechanical malfunction and consequently the loss or damage of stored data.
The technology of SDD is purely electronic it does not mean the malfunction or the damage of the device but the risk is less high and also another strong point is super fast compared to the HDD