Skip to main content

Posts

Showing posts matching the search for react

TOP 50 React JS Interview Question and Answer by Shiva Sir | React JS Inteview Question and Answer

  TOP 50 React JS Interview Question and Answer by Shiva Sir |  React JS Interview Question and Answer: Now a days most of the IT Company asked REACT JS Question mostly in interview. I am creating this article to provide help to all REACT IMPORTANT QUESTIONS  I am Shiva Gautam,  I have 15 Years of experience in Multiple IT Technology, I am Founder of Shiva Concept Solution Best Programming Institute with 100% Job placement guarantee. If you want to know more visit  Shiva Concept Solution                                  Watch Complete Video Visit  Youtube Shiva Concept Top 50 React Interview Questions and Answers React is one of the most popular JavaScript libraries for building user interfaces. If you're preparing for a React job interview or simply want to sharpen your skills, this comprehensive list of 50 important React interview questions will help you master the key ...

React-js Fundamental, Installation of React Js, What is React JS, Flow of React JS

ReactJS is a declarative, efficient, and flexible JavaScript library for building reusable UI components.  It is an open-source, component-based front-end library responsible only for the view layer of the application.  It was created by Jordan Walke , who was a software engineer at Facebook.  It was initially developed and maintained by Facebook and was later used in its products like WhatsApp & Instagram.  Facebook developed ReactJS in 2011 in its newsfeed section, but it was released to the public in the month of May 2013. Today, most of websites are built using MVC (model view controller) architecture.  In MVC architecture, React is the 'V' which stands for view, whereas the architecture is provided by the Redux or Flux . A ReactJS application is made up of multiple components, each component responsible for outputting a small, reusable piece of HTML code.   The components are the heart of all React applications . These components can be nested wit...

Fragment in React JS

The fragment is the replacement of the root element of the component. in some cases, design can be different when we use the <div> tag that's why React. Fragment implemented to remove designing Fragment provides better performance as compare to div tag under render() hence we should always use Fragment in place of <div>. Why we use Fragments? The main reason to use the Fragments tag is: It makes the execution of code faster as compared to the div tag. It takes less memory. Syntax <React.Fragment>         <h2> child1 </h2>        <p> child2 </p>          .. ..... .... ...   </React.Fragment>   Example // Rendering with fragments tag   class App extends React.Component {        render() {         return (           <React.Fragment>        ...

What is Refs in React

Refs is the shorthand used for references in React. It is similar to keys in React. It is an attribute which makes it possible to store a reference to particular DOM nodes or React elements. It provides a way to access React DOM nodes or React elements and how to interact with it. It is used when we want to change the value of a child component, without making the use of props. When to Use Refs Refs can be used in the following cases: When we need DOM measurements such as managing focus, text selection, or media playback. It is used in triggering imperative animations. When integrating with third-party DOM libraries. It can also use as in callbacks. When to not use Refs Its use should be avoided for anything that can be done declaratively. For example, instead of using open() and close() methods on a Dialog component, you need to pass an isOpen prop to it. You should have to avoid overuse of the Refs. How to create Refs In React, Refs can be created by using React.createRef(). It can b...

React native tutorial:-

React native is used to create a native mobile application that can execute on Android and iOS platforms both, we can not create a web application using this. React native is not used to create hybrid applications, it is used to create native common platform applications that provide separate configurations for iOS and Android devices. How to install React Native  1) Install java and set Java_Home Path under environment Variable 2)  Install Android studion and Set Android_Home path  3)  Create AVD using android studio 4)  Run Avd Externally using following command open command prompt and write following code Default Android Location for Windows C:/Users/MachineName/AppData/local/Android/SDK/emulator Write follwing command to open emalutor .\emulator.exe -avd "Testavd" 5)  Install React native globally in Operating System for outdated version:  npx install -g react-native-cli react-native init AwesomeProject  react-native run-android for latest ver...

React Code Splitting, How to improve performance of React application

In this article, I am trying to cover the following topics 1)  React Code Splitting 2)  React Lazy Loading 3)  Suspense in React 4) Error Boundary in React The React app bundled their files using tools like Webpack or Browserfy. Bundling is a process that takes multiple files and merges them into a single file, which is called a bundle. The bundle is responsible for loading an entire app at once on the webpage. We can understand it from the below example. App.js import { add } from './add.js';   console.log(add(16, 26)); // 42   add.js export function add(a, b) {     return a + b;   }   Bundle file as like below: function add(a, b) {     return a + b;   }   console.log(add(16, 26)); // 42   As our app grows, our bundle will grow too, especially when we are using large third-party libraries. If the bundle size gets large, it takes a long time to load on a webpage. For avoidi...