Any good debug tutorial for React.js [closed]

It’s difficult to describe a general strategy to debug “a lot error shown up” so I will walk you through the process for debugging component level errors:

  1. Install the React dev tools extension for your browser of choice:

    • Chrome
    • Firefox
  2. Find the component

    I recommend either of these paths:

    2.a. Open React tab from your browser dev tools and type in the bottom search bar to lookup components by name.

    2.b. Open Elements tab, select some element, and switch back to React. The component hierarchy will be expanded up until the React component matching the DOM node you selected in Elements.

  3. Inspect the state and props of the component that is behaving incorrectly.

If for some reason you don’t like installing browser extensions, you can throw one or more debugger; statements to set breakpoints that will “pause” the execution of your app and let you inspect the call stack, scope, and errors at these points.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)