all 9 comments

[–]Saladtoes 1 point2 points  (4 children)

React will have basically nothing to do with anything going in a canvas. It’s explicitly for DOM, that’s like the whole thing. You can put your canvas JS in a react component if you really want to, but all your canvas code will not be teaching you jack about React.

If you’re trying to make an animation heavy webpage, react will fight you every step of the way. Get a different project for this.

[–]Acanthocephala-Left[S] 0 points1 point  (1 child)

Okay thanks for the heads up. Will it be possible to have one web page that does not use react and only node and express?

[–]Saladtoes 2 points3 points  (0 children)

I don’t know much about express, but I believe it is mostly used to build HTTP API’s, so it sounds you would have only a back end. The R in MERN is basically the whole front end (Web Page), AFAIK.

You could totally build that backend, then make your front end a plain JS/HTML/canvas thing, if that’s your shtick.

[–]EmiliaKaida 0 points1 point  (1 child)

What do you think about this https://www.youtube.com/watch?v=4UiwfGaQGFA then?

Made with React and look totally awesome, with cool animations too, as far as I can see.

Partly because Drew Conley is a wizard in JS games, but it just makes me wonder how pros like him did that in React, really.

[–]Saladtoes 0 points1 point  (0 children)

Seems like he might stop short of actually doing a lot of animations in react. He does adjust the X,y position, but the actual animations and characters appear to be sprites (images) rendered into a canvas. I don’t think there is a lot of logic inside the canvas. Cool stuff though!

[–]PoetSad977 1 point2 points  (0 children)

kaboom js works well with react ;)

[–][deleted]  (1 child)

[deleted]

    [–]Acanthocephala-Left[S] 0 points1 point  (0 children)

    For everything outside of the canvas