A nice option is to visualise React components in the chrome timeline. This lets you see which components exactly get mounted, updated, and unmounted and how much time they take relative to each other. That feature was added as part of the release of React 15.4.0. You can take a look at the official blogpost to get a better insight, but summing up, those are the steps to get it up and running:
Load your app with ?react_perf in the query string (for example, http://localhost:3000/?react_perf).
Open the Chrome DevTools Timeline tab and press Record.
Perform the actions you want to profile. Don't record more than 20 seconds or Chrome might hang.
React events will be grouped under the User Timing label.
After that, you will get a cool visual representation of mounting, updating and unmounting of your different components over time
In addition to rauliyohmc answer. Profiling tool he described is really helpful and powerful, but if your task is just checking if there are unnecessary re-renders (i.e. ones which did not lead to DOM changes) you can use nice and simple react-addons-perf tool. It has
printWasted method which will provide you info about wasted re-renders.
- How to check when the react components get rendered or rerendered
- How to update (re-render) the child components in React when the parent's state change?
- How do I get my React TextField to open the number pad when inputting on a mobile device?
- How to optimize React components with React.memo and useCallback when callbacks are changing state in the parent
- How does React re-use child components / keep the state of child components when re-rendering the parent component?
- How to get JWT cookies in our react application, how to check the user is login or not I am unable to find how to handle my react application session
- How can i write a test using React Testing Library to check if hover changes the components style?
- ReactJS: How to get response array inside State(useState) and check the length of the array when rendering/binding
- How to get the data from Redux store using class components in React
- How to fix "Uncaught Error: Objects are not valid as a React child" when passing objects, obtained from the blockchain, to the children components
- how to get the full event object when using RadioGroup in react
- How to reinitialize the state with react hook when rerender the components
- How to get the ref.current dom element when using react-select and react refs?
- How to dynamically order my react components according to the order I get from my request?
- How do you get rid of the console warning “Undefined” when using the React Data Grid
- How to get starting URL when user visit to the website in React JS or React Router?
- When redirecting to a route under a container, the child components won't get rendered
- How do I get the Id when clicked on the first row in React JS?
- How to get the value of redux store in other components on typescript react hooks project
- After being able to load the landing page(Home component) , how do you get the rest of the react components to render through github pages?
- How to get React App change content on the screen when screen width changes
- React : How to render a component which depends on the data rendered by other components
- how to get the rendered HTML element from the screen, from react testing library?
- How to reset the state in react when component is rendered or shown?
- How do I get the id of div wrapper in React when childnodes are the click event target?
- How to Revert to the Original Background Color of previously Clicked Components When Clicking Another in React
- How to hide a button when I click the button in react using functional components
- React - How to pass props down for the .map function when using functional components
- When we render react Components from an iterable using Array.prototype.map() how is the index generated, and how does react uses it?
- How do we get the types returned by array.map to be used as React components in typescript?
More Query from same tag
- React component not rerendering after array inside object has items pushed to it
- <Table> in react-bootstrap - SyntaxError
- how to set dynamic select items in react-multi-select-component in reactjs
- Error while using useState hook in form in react
- Getting back the value of a `cleared` input element with React Select
- Most efficient way for checking the existence of a property
- React TypeError: Object(...)(...) is undefined when using Context API
- Dynamically creating an element on which the react app mounts
- What is wrong with my checkAuth function?
- Expected mock function to have been called one time, but it was called zero times. in react
- react - fetch from other file not working - without error
- Reactjs custom element rendering by string
- react-draft-wysiwyg - Prevent drag and drop text if max-length exceed
- While using redux in react, the moment I use <Provider></Provider> in my code it throws weird error. what's this?
- Set a variable to true if all the props are defined
- I cannot use mouse events on React to change background-color
- Work out whether custom radio component is checked or not
- Animation on element not applied
- error in deployment to AWS s3 webpack react
- Its return type 'Element | undefined' is not a valid JSX element. Type 'undefined' is not assignable to type 'Element | null'
- React - My user interface does not re-render properly when my React hook is updated
- How can i call a function inside another Component with React?
- Error: connect ECONNREFUSED 127.0.0.1:80 if an axios fetch gets initialized outside of a react component react-testing-library/msw
- How to resolve @typescript-eslint/no-var-requires error. Error while adding @axe-core/react
- Parsing react props to react component from HTML view
- Element type is invalid: expected a string (for built-in components) ...... Check the render method of `App`
- How to pass props from one component to another along with props validation - React Hooks
- Build relay queries dynamically
- How do I mock firebase analitycs with jest?