itsmyrice / gamedalf

https://gamedalf.vercel.app
2 stars 0 forks source link

Random game page #44

Closed kabaskill closed 8 months ago

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gamedalf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 4:38pm
kabaskill commented 8 months ago

Everything is fine ^^

One thing: we must aim at keeping the React components as short as possible. Everything that can be outsourced to external functions, it should be.

You can prepare functions like rollDice or getRandomGame that return stuff (without updating any state), then use them inside your components. This way you remove logic choice from the UI layer!

This makes so much sense and I hope, I could think of it when I'm writing the thing. Thanks for the approval. We're gonna do a refactoring update for this in the future.