4 ms·
Ha ha - very interesting use of React... I love that the columns are components! Though my "negative nancy" comment would be that this is the wrong tool for th
by mrspeaker 7y ago
Ha ha - very interesting use of React... I love that the columns are components!
Though my "negative nancy" comment would be that this is the wrong tool for the job (or at least, it could use a little renaming?) because after jumping from Scene to App to useCastRays hook... I finally found all the actual logic in "utils": which I'm always suspicious of ;)
Anyhoo - really cool, I'd like to see how the 2D sprites are integrated!
- ahuth 7y agoDefinitely a misuse of React! And for whatever reason, naming is always an issue for me. Need a better name than "utils" for sure. One thing that surprised me about this is how fast the browser renders 320 absolutely positioned divs that are constantly updating. But then I thought about it some more, and realized that many websites these days probably have way more DOM and DOM manipulation than that going on!
- xendke 7y agoAs a developer that uses react every day, I'm so glad it was used in this project because I was able to look at the code and understand it quite quickly!
- ahuth 7y agoThat's the reason I used React in the first place - because I'm very familiar with it. Made it easier to focus on the concepts, not the technology.
- adamredwoods 7y agoI applaud the misuse of React! We've seen a lot of raycasters, so one made with React and hooks isn't a bad thing. Interesting code of using useRef with your state, and then useEffect to update it every render. A simple/better Redux?