Home / Class/ Example Class — react Architecture

Example Class — react Architecture

Architecture documentation for the Example class in ReactTestRendererAsync-test.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  9e992510_718a_f2e1_39d6_d0bc57a448da["Example"]
  5e84c1de_f6f8_5905_bdd7_16058f355f79["ReactTestRendererAsync-test.js"]
  9e992510_718a_f2e1_39d6_d0bc57a448da -->|defined in| 5e84c1de_f6f8_5905_bdd7_16058f355f79
  0a02033e_c873_bad1_e5c0_d0a888042533["componentDidMount()"]
  9e992510_718a_f2e1_39d6_d0bc57a448da -->|method| 0a02033e_c873_bad1_e5c0_d0a888042533
  9732c4cb_4b5e_c277_15cd_45b122bc8f23["componentDidUpdate()"]
  9e992510_718a_f2e1_39d6_d0bc57a448da -->|method| 9732c4cb_4b5e_c277_15cd_45b122bc8f23
  7f4ac298_9f37_e90e_7fb2_ceff582b9381["render()"]
  9e992510_718a_f2e1_39d6_d0bc57a448da -->|method| 7f4ac298_9f37_e90e_7fb2_ceff582b9381

Relationship Graph

Source Code

packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js lines 120–135

    class Example extends React.Component {
      componentDidMount() {
        expect(this.props.step).toEqual(2);
      }
      componentDidUpdate() {
        throw Error('Unexpected update');
      }
      render() {
        return (
          <>
            <Child>{'A:' + this.props.step}</Child>
            <Child>{'B:' + this.props.step}</Child>
          </>
        );
      }
    }

Frequently Asked Questions

What is the Example class?
Example is a class in the react codebase, defined in packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js.
Where is Example defined?
Example is defined in packages/react-test-renderer/src/__tests__/ReactTestRendererAsync-test.js at line 120.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free