Netlify won't register form

I am using React.js and I can’t seem to get netlify to acknowledge my form for some reason…

Here is my code:

    function Contact(){
  const [success, setSuccess] = useState(false);

  useEffect(() => {
    if ('success=true')) {
  }, []);

  return (
    <div className='contact'>
      <div className='contact__left'>
        <form name='contact' className='contact__form' method='POST' action="/contact/?success=true" data-netlify='true' >
          <div className='contact__container'>
            <input type="hidden" name="form-name" value="contact" />
            <input className='contact__input' type='text' name='name' placeholder={`What's your name?`} required></input>
            <input className='contact__input' type='email' name='email' placeholder='Email?' required></input>
            <textarea className='contact__details' type='text' name='message' placeholder='Details...' required></textarea>
            <button className='contact__button' name='submit'>Let's do it!</button>
      <div className='contact__right'>
        <h1 className='contact__call'>
          Let's Get Started!

export default Contact;

I’ve also added this to the index.html as per some forum post I saw but have since lost…

<form name="contact" netlify netlify-honeypot="bot-field" action='/' hidden>
      <input type="text" name="name" />
      <input type="email" name="email" />
      <textarea name="message"></textarea>

Hey there, @nickyiie :wave:

Welcome to the Netlify Forums! Sorry you are having trouble getting your forms to work.

This Support Guide is the first port of call to debug any forms issues. There are also many other Support Guides for forms - you can find them here: #Netlify-support:support-guides

We also recommend trying to search the forums or look at topics tagged Netlify forms if you haven’t already - it’s likely your question was already asked by someone else!

If you are still having problems, please provide the following information:

  1. The URL for your live form as you want visitors to use it
  2. The URL of your deployed html form. In case you have a javascript form, we need to literally be linked to the html version you’ve deployed, as mentioned above (look for “ pure javascript form ”)
  3. The form name that you’ve set and that shows in our UI
  4. Any errors or logs from the Netlify build logs, dashboard or browser developer console
  5. Description of anything you have tried that did or didn’t help or make things better/worse

Thank you :slight_smile: