Home / Class/ ControlledFormFixture Class — react Architecture

ControlledFormFixture Class — react Architecture

Architecture documentation for the ControlledFormFixture class in ControlledFormFixture.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  16e01f81_657f_1153_c3c5_437683dc9591["ControlledFormFixture"]
  94fc7e87_06ae_cde8_c174_2ca690027179["ControlledFormFixture.js"]
  16e01f81_657f_1153_c3c5_437683dc9591 -->|defined in| 94fc7e87_06ae_cde8_c174_2ca690027179
  50bd7d03_1a6f_5ba0_48bd_4c54496b5d5c["constructor()"]
  16e01f81_657f_1153_c3c5_437683dc9591 -->|method| 50bd7d03_1a6f_5ba0_48bd_4c54496b5d5c
  6c614694_7774_3dfd_b79f_513973b9402a["handleEmailChange()"]
  16e01f81_657f_1153_c3c5_437683dc9591 -->|method| 6c614694_7774_3dfd_b79f_513973b9402a
  5e111066_8c05_eb14_2d79_45b31c46afc5["handleNameChange()"]
  16e01f81_657f_1153_c3c5_437683dc9591 -->|method| 5e111066_8c05_eb14_2d79_45b31c46afc5
  a37df506_2c1d_d36f_b4ff_a4b34b5387af["render()"]
  16e01f81_657f_1153_c3c5_437683dc9591 -->|method| a37df506_2c1d_d36f_b4ff_a4b34b5387af

Relationship Graph

Source Code

fixtures/dom/src/components/fixtures/form-state/ControlledFormFixture.js lines 4–58

class ControlledFormFixture extends React.Component {
  constructor(props) {
    super(props);
    this.state = {name: '', email: ''};

    this.handleEmailChange = this.handleEmailChange.bind(this);
    this.handleNameChange = this.handleNameChange.bind(this);
  }

  handleEmailChange(event) {
    this.setState({email: event.target.value});
  }

  handleNameChange(event) {
    this.setState({name: event.target.value});
  }

  render() {
    return (
      <Fixture>
        <form>
          <label>
            Name:
            <input
              type="text"
              value={this.state.name}
              onChange={this.handleNameChange}
              name="name"
              x-autocompletetype="name"
            />
          </label>
          <br />
          <label>
            Email:
            <input
              type="text"
              value={this.state.email}
              onChange={this.handleEmailChange}
              name="email"
              x-autocompletetype="email"
            />
          </label>
        </form>
        <br />
        <div>
          <span>States</span>
          <br />
          <span>Name: {this.state.name}</span>
          <br />
          <span>Email: {this.state.email}</span>
        </div>
      </Fixture>
    );
  }
}

Domain

Frequently Asked Questions

What is the ControlledFormFixture class?
ControlledFormFixture is a class in the react codebase, defined in fixtures/dom/src/components/fixtures/form-state/ControlledFormFixture.js.
Where is ControlledFormFixture defined?
ControlledFormFixture is defined in fixtures/dom/src/components/fixtures/form-state/ControlledFormFixture.js at line 4.

Analyze Your Own Codebase

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

Try Supermodel Free