Next.js Discord

Discord Forum

State update between client and server

Unanswered
Blanc de Hotot posted this in #help-forum
Open in Discord
Original message was deleted.

3 Replies

Shy Albatross
because you're passing a response which is an awaited result and the fact that you're calling the same function on click means nothing because you're not doing anything with the result, not even awaiting it
add state to your Client, await sayHello() and setState the result from that await, then render that state instead of passing response through props
Blanc de Hotot
thanks for the tip btw