D
D
derty142020-01-26 10:19:43
Node.js
derty14, 2020-01-26 10:19:43

How to make a contact form in creacte-react-app?

I made a form according to this guide https://blog.mailtrap.io/react-contact-form/#How_d... , at the end it says that you need the created index.js file (it is in the components folder, because create- react-app creates index.js initially) run through node index, but since I already have a react project and I start the server with nmp start, I can't run this command.
Thanks in advance.
Here is the structure5e2d3c7cd909a386500573.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
name surname, 2020-01-26
@symbol

index.js (located in the components folder since create-react-app creates index.js initially)

this is not the same index.js, you should have created a separate project
. The tutorial says:
var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
и тд...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question