brandly / brandly/react-tetris
ReferenceError: document is not defined
Open
- Dominant language
- TypeScript
- Stars
- 140
- Forks
- 70
- PR merge metrics
- No merged PRs in 30d
Description
Environment:
- [x] nextjs
- [x] node: v21.5.0
- [x] react: 18+
I am trying to conditionally render component when the user wants to play a game
`const [playTetris, setPlayTetris] = useState(false);`
and conditional render
`{ playTetris && ) }`
At the dev environment - doesn't make any problem.
While Building:
> ReferenceError: document is not defined
Probably, the Tetris component trying to access the window.document before **ComponentDidMount**?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.