Skip to content

tsukiy0's blog

Inspect React source with DevTools

March 15, 2021

Why?

E.g. we need to know all the permutations of a component, but the props are not easy to modify and the source is not public.

How?

  1. Find the component

    Find the component 1

  2. Select the component with the element picker

    Find the component 2

  3. Open the source

    Sometimes the displayed component is not the one with the relevant props, we may need to climb up the component tree to find the correct parent.

    Open the source

    Source


tsukiy0