DEV Community

Cover image for React core concept!
Abu Naser Dipu
Abu Naser Dipu

Posted on • Updated on

React core concept!

1. What is react?
Ans: React is a Javascript library, it's not a framework. it's lightweight easy to use and makes the website UI cooler! React do one thing at a time and finished it well.

2. Difference between library & framework
Ans: The difference between library & framework is the library would be changed by the user as he wants but the framework has a specific rule which must maintain a user. The big problem with the framework is if the user implements one thing then the full system load automatically.

3. Why react so popular?
Ans: React is a lightweight library. It makes programmer work easy to create UI. It builds up a relation between developers and browsers so developers can modify UI easily. React introduced the developer with the smart idea of virtual DOM(Document Object Model).

4.The benefit of using React?
Ans: Before react, developers worked with DOM API and it working is hard. Anyone who has knowledge of Javascript can easily use ReactJS. For Android and IOS Mobile Applications React Native so beneficial and ReactJS users can easily maintain React Native. Most of the features of ReactJS were released after the test at facebook.com so the bug possibility has zero.

5. How to React update instantly?
Ans: React update the specific functionality which needs update and doing this work React doesn't run full functionality it remove the update complexity and browser performance fast.

6. What is JSX?
Ans: JSX an extension to javascript it helps to write HTML code in Javascript code so the user could not be open another HTML file to write HTML code. Browser isn't able to read JSX files directly for that browser translate these JSX codes and this call
"transpiler". We can use Babel or Typescript as a transpiler.

7. React component and apply CSS
Ans: React is a component-based library. This helps website renders first because which component needs it to render only that. To make a component its name must declare in capital letter. Although the small letter component name worked the capital letter is good practice. We can use CSS inside React component but its method is using inside double curly braces.

8. React functions and classes
Ans: The beginning stage of React is used as a class-based components library. Many complexity and limitations replaced it with a function method also called React Hooks. Compare between classes and functions, function Is simple and user friendly its benefit is complex component break into smaller parts.

9. Why React use component?
Ans: Component makes code readable and simple, it helps to break a big or complex code into smaller parts. User can reuse a component where they need. Declaring global variable it's easy to use from any component.

10. React Hooks discussion
=> React Hooks is more powerful and you can do it as your need. All hooks function must need a state that declares with useState. This hooks side effects can be manageable by using useEffect. React hooks function only usable in a function component it couldn't be a usable in-class component.

Top comments (0)