FilipeMSouza / rpg-handouts

https://rpgstream.vercel.app
0 stars 0 forks source link

Simplify Data usage and modification for a single player #8

Closed h80r closed 4 months ago

h80r commented 4 months ago

Problem

Currently the player-specific page to display stats is using the same hook as the test page which displays all players data. This behavior results in complicated mutation functions that can lead to data loss.

Solution

To mitigate this issue a new hook needs to be created. It's expected to receive the ID of a specific player and return an array in a similar fashion to how useState works. Internally it should use the base Realtime Hook and promote changes exclusively to the selected player.