---
title: "Comment by Pawel on \"Build a MySQL Node.js CRUD App #3: The Client-Side with React\" | Hashnode"
description: "I see one little problem with useState and }, [reviews]). This generates continuos requests to api by getReviews function. Try put console.log inside that funct"
url: "https://hashnode.com/posts/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react/5ffce16f09213c08384760c9/comment/600f5e7f9d3cb25c41e0a4f4"
---

[Discussion](https://hashnode.com/posts/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react/5ffce16f09213c08384760c9)

Comment [Build a MySQL Node.js CRUD App #3: The Client-Side with React](https://hashnode.com/posts/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react/5ffce16f09213c08384760c9)

[Pawel](https://hashnode.com/@kossy77)

[Jan 26, 2021](https://hashnode.com/posts/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react/5ffce16f09213c08384760c9/comment/600f5e7f9d3cb25c41e0a4f4)

I see one little problem with useState and }, \[reviews\]). This generates continuos requests to api by getReviews function. Try put console.log inside that function. I saw the same problem in other similar articles. IMO better is let useState has empty \[ \], and call getReviews function from each components that make change to database. End effect is the same and there is no unnecessary api requests.

[mbvkken](https://hashnode.com/@mbvkken)

[Jun 3, 2021](https://hashnode.com/posts/build-a-mysql-nodejs-crud-app-3-the-client-side-with-react/5ffce16f09213c08384760c9/comment/600f5e7f9d3cb25c41e0a4f4#reply-60b8af0ce7631679eb8dcf38)

How would you go about fixing this? Do you have an example code?:)
