DEV Community

Discussion on: Setting up a news letter with React and mailchimp

raphaelpinel profile image
Raphaël Pinel

From what I read, you don't need dotenv anymore with create-react-app. It is supported out of the box
Create your .env file in the root folder, not in src.
And be sure to restart your server.

I also noticed that react-mailchimp-subscribe 2.1.1 was not yet supporting React 17, and I had to install it with npm i react-mailchimp-subscribe --force