Sha256: e57991c177713dfec0234d26869bad7457ec037d64d84c552aedc4a785578a5a

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

<!DOCTYPE html>
<html>
  <head>
    <script src="https://unpkg.com/react/umd/react.development.js"></script>
    <script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script>
      // https://codepen.io/gaearon/pen/VmmPgp?editors=0010
      class NameForm extends React.Component {
        constructor(props) {
          super(props);
          this.state = { value: '' };

          this.handleChange = this.handleChange.bind(this);
          this.handleSubmit = this.handleSubmit.bind(this);
        }

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

        handleSubmit(event) {
          alert('A name was submitted: ' + this.state.value);
          event.preventDefault();
        }

        render() {
          return (
            React.createElement("form", { onSubmit: this.handleSubmit },
            React.createElement("label", null, "Name:",

            React.createElement("input", { type: "text", value: this.state.value, onChange: this.handleChange })),

            React.createElement("input", { type: "submit", value: "Submit" })));
        }}


        ReactDOM.render(
        React.createElement(NameForm, null),
        document.getElementById('root'));
    </script>
  </body>
</html>

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/capybara-3.40.0/lib/capybara/spec/views/react.erb
capybara-3.40.0 lib/capybara/spec/views/react.erb
capybara-3.39.2 lib/capybara/spec/views/react.erb
capybara-3.39.1 lib/capybara/spec/views/react.erb
capybara-3.39.0 lib/capybara/spec/views/react.erb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/spec/views/react.erb
capybara-3.38.0 lib/capybara/spec/views/react.erb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/capybara-3.37.1/lib/capybara/spec/views/react.erb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/capybara-3.37.1/lib/capybara/spec/views/react.erb
capybara-3.37.1 lib/capybara/spec/views/react.erb
capybara-3.37.0 lib/capybara/spec/views/react.erb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/lib/capybara/spec/views/react.erb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/capybara-3.36.0/lib/capybara/spec/views/react.erb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/capybara-3.36.0/lib/capybara/spec/views/react.erb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.36.0/lib/capybara/spec/views/react.erb
capybara-3.36.0 lib/capybara/spec/views/react.erb