I want to get a value from client side and use it in server side,
But I don’t know how to use use State and I know there is no way to using useState in server side
So Is there any solution to use instead??!
In fact there is a url in serverside and I want to get the value from client side and use it in that url with ${}
2
Answers
You can achieve your goal by passing the client-side value to the server through a request, query parameter, or API endpoint.
Client side:
Server Side:
please try to explain a little be more what do you need to do with this information in server side
and i will try to help you
but if you need some data in server side
you can send this with axios but it’s depends what do you want to do
in server side like POST / GET / DELETE / PUT
and according this i will help you to write the code