Closed r0man1337 closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jun 12, 2024 3:25pm |
β±οΈ Estimated effort to review [1-5] | 2 |
π§ͺ Relevant tests | No |
π Security concerns | No |
β‘ Key issues to review | None |
Category | Suggestion | Score |
Possible bug |
Add missing dependencies to
___
**Ensure that | 9 |
Update
___
**Add | 9 | |
Performance |
Memoize the result of
___
**Replace the direct usage of | 8 |
Use
___
**Consider using | 8 |
User description
Fixed wrong usage of useMemo. All setState calls should be placed inside useEffect hooks instead of useMemo.
Wrong usage causing such errors:
PR Type
Bug fix
Description
useMemo
withuseEffect
in two files to ensure state updates are correctly handled._mapStore.tsx
.WorldHexagon.tsx
.Changes walkthrough π
_mapStore.tsx
Replace `useMemo` with `useEffect` for built structures setup
client/src/hooks/store/_mapStore.tsx
useMemo
withuseEffect
for setting up built structures.useEffect
.WorldHexagon.tsx
Replace `useMemo` with `useEffect` for stamina calculations
client/src/ui/components/worldmap/hexagon/WorldHexagon.tsx
useMemo
withuseEffect
for stamina-related calculations.useEffect
.