We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I see this was fixed in #2 but it seems to still be happening for me using 5.1.2
Example code:
export default class IndexPage extends React.Component { state = { email: null, firstname: null, lastname: null } _handleChange = (e) => { this.setState({ [`${e.target.name}`]: e.target.value, }); } _handleSubmit = e => { e.preventDefault() console.log('submit', this.state) addToMailchimp(this.state.email, { FNAME: this.state.firstname, LNAME: this.state.lastname }) .then(({ msg, result }) => { console.log('msg', `${result}: ${msg}`) if (result !== 'success') { throw msg } alert(msg) }) .catch(err => { console.log('err', err) alert(err) }) } render() { return ( <form onSubmit={this._handleSubmit}> <div className='form-group'> <label htmlFor='email'>Email Address</label> <input type='email' name='email' className='form-control' id='email' aria-required='true' onChange={this._handleChange} /> </div> <div className='form-group'> <label htmlFor='firstname'>First Name</label> <input type='text' name='firstname' className='form-control' id='firstname' aria-required='true' onChange={this._handleChange} /> </div> <div className='form-group'> <label htmlFor='lastname'>Last Name</label> <input type='text' name='lastname' className='form-control' id='lastname' aria-required='true' onChange={this._handleChange} /> </div> </form> ) } }
The text was updated successfully, but these errors were encountered:
Figured it out, i was being an idiot, i didn't fill out the endpoint correctly and so it was 404'ing.
endpoint
I'll get my coat
Sorry, something went wrong.
No branches or pull requests
I see this was fixed in #2 but it seems to still be happening for me using 5.1.2
Example code:
The text was updated successfully, but these errors were encountered: