Sha256: aeebce466837fd9a64141721dbfc8d8eba7a0141a46e9680f8bc77332a108232

Contents?: true

Size: 1.31 KB

Versions: 50

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

50 entries across 38 versions & 3 rubygems

Version Path
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/spec/views/react.erb
capybara-3.33.0 lib/capybara/spec/views/react.erb
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/capybara-3.32.2/lib/capybara/spec/views/react.erb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb
capybara-3.32.2 lib/capybara/spec/views/react.erb
capybara-3.32.1 lib/capybara/spec/views/react.erb
capybara-3.32.0 lib/capybara/spec/views/react.erb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/capybara-3.31.0/lib/capybara/spec/views/react.erb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb
capybara-3.31.0 lib/capybara/spec/views/react.erb
capybara-3.30.0 lib/capybara/spec/views/react.erb
tdiary-5.1.0 vendor/bundle/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/capybara-3.29.0/lib/capybara/spec/views/react.erb
capybara-3.29.0 lib/capybara/spec/views/react.erb
capybara-3.28.0 lib/capybara/spec/views/react.erb
capybara-3.27.0 lib/capybara/spec/views/react.erb
capybara-3.26.0 lib/capybara/spec/views/react.erb
capybara-3.25.0 lib/capybara/spec/views/react.erb
capybara-3.24.0 lib/capybara/spec/views/react.erb