A
A
AntonGre4ka2020-07-23 18:17:53
React
AntonGre4ka, 2020-07-23 18:17:53

How to cancel page refresh when adding data to database using json-server?

React app.
When starting in useEffect(), I make a request to json-server `y, having received a response, I add it to state. In the child component, I make a post request. When changes are made, the application restarts.
what to do, how to be? thanks in advance) e.preventDefault() doesn't save

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tervizator, 2020-07-25
@AntonGre4ka

Not very clear :)
How to understand the application is restarting?
Show the code, it's better to post it somewhere)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question