Skip to content

Fix all the build warnings #54

Description

@zachpmanson

I'm breaking some rules of react. Run npm run build to see this:

./src/components/CraftingTable.component.tsx
71:6  Warning: React Hook useEffect has a missing dependency: 'currentTable'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./src/context/Global/index.tsx
61:9  Warning: The 'resetGame' function makes the dependencies of useMemo Hook (at line 396) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'resetGame' in its own useCallback() Hook.  react-hooks/exhaustive-deps
111:6  Warning: React Hook useEffect has a missing dependency: 'allRecipesAllVariants'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
140:6  Warning: React Hook useEffect has missing dependencies: 'gameDate' and 'generateSetPuzzle'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
223:9  Warning: The 'checkAllVariants' function makes the dependencies of useMemo Hook (at line 396) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'checkAllVariants' in its own useCallback() Hook.  react-hooks/exhaustive-deps
236:9  Warning: The 'getFirstSolutionVariant' function makes the dependencies of useMemo Hook (at line 396) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'getFirstSolutionVariant' in its own useCallback() Hook.  react-hooks/exhaustive-deps
240:9  Warning: The 'trimVariants' function makes the dependencies of useMemo Hook (at line 396) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'trimVariants' in its own useCallback() Hook.  react-hooks/exhaustive-deps

./src/pages/index.tsx
38:6  Warning: React Hook useEffect has a missing dependency: 'resetGame'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
81:6  Warning: React Hook useEffect has missing dependencies: 'craftingTables.length', 'gameDate', 'random', and 'userId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./src/pages/stats/[userId].tsx
30:6  Warning: React Hook useEffect has a missing dependency: 'router.query.userId'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions