Open wingtkw opened 8 months ago
here is a quick demo on the use of jotai you may view how it's done in the /feature/frontend/navbar branch
jotai looks good
also one thing, do we need something like react query to manage our server state? or just manage it manually in jotai,
I haven't used react query, but it's very popular.
For managing server state I use react query before for rest api And it's quite easy to use
But I guess in our game We are mostly using socket as well for real time state change and update So I think socket io client is more appropriate in this case
ok, I see👌
It is time to document API endpoint to socket.io server, to let frontend people know how to interact with socket.io
server.
I will add more detail at here (by editing this comment) tomorrow morning if I have time .
Relevant discussion :
socket.io
in current project)socket.io
events
@KalpasWang @sandytang886 Any suggestion on how to store the status in frontend?
e.g. how many cultists & shoggoths left? user info? turns left? that kind of thing
A library that I have used is named jotai which is a more atomic one compared with redux
https://jotai.org/docs/basics/comparison