title: Form Submit Message in React
body: <p>I am trying to have a message appear with &quot;You are now subscribed to {SUBSCRIPTION}.&quot; when a user submits a form in React. I am very new to React, so I feel like I am missing something small (hopefully).</p>
  <p>So far, I have something that looks like this:</p>
  <pre><code>constructor(props) {
          super(props);
  
          this.state = {
              user: {
                  newsletter: props.newsletter
              }
          }
      }
  
      handleNewsletterInput(event) {
          var user = this.state.user;
  
          user.newsletter = event.target.value;
  
          // Update the state object
          this.setState({ user: user })
      }
  
      handleSubmit(event) {
          var user = this.state.user;
  
          user.newsletter = event.target.value;
  
          alert(&quot;You are now subscribed to &quot; + { user } + &quot;.&quot;)
      }
  
      ...
  
      render() {
          return (
              &lt;div&gt;
                  &lt;h2&gt;Subscribe&lt;/h2&gt;
                  &lt;form onSubmit={this.handleSubmit.bind(this)}&gt;
                      &lt;label&gt;
                          &lt;p&gt;Newsletter Type:&lt;/p&gt;
                          &lt;input
                              id='newsletter'
                              type='text'
                              name='newsletter'
                              value={this.state.user.newsletter}
                              onChange={this.handleNewsletterInput.bind(this)}
                          /&gt;
                      &lt;/label&gt;
                      &lt;button
                          type='submit'
                          id='subscribe'
                          name='subscribe'&gt;
                          Subscribe
                      &lt;/button&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
          );
  
       ...
  </code></pre>
  <p>When I run it, I get a message saying &quot;You are now subscribed to [object Object].&quot; What am I doing wrong, and how can I get [object Object] to say the name of the newsletter?</p>