Closed sebastianmenge closed 9 years ago
I dunno, that should work.
Does it work if you replace the JSX with javascript? Does the jsxtransform.jsx
example work? Can you maybe put up a gist and reference it here?
doesn't make difference if i use javascript or jsx. both is not working but the jsx example works fine for me.
here is the gist: https://gist.github.com/sebastianmenge/07723e62ca78081176b7
as soon as i require and use the Canvas component which requires react-three, all parents of canvas only do the initial render except the canvas component itself. it updates normally.
have you used webpack with react-three? maybe thats an issue.
I've not used webpack before, so it's possible.
Well, react-three does some monkey-patching of React in order to fix certain problems like this one. There may be some wierd interaction between the monkey-patch and webpack that causes this.
You can try to comment out this line in ReactTHREE.js to see if it fixes the problem. If that's the problem I'll have to come up with some other way to 'fix' React
commenting the line fixed the problem.
Hm, well that needs to be fixed. Adding #15
hey, i'm encountering another problem. it is pretty weird. as soon as i require react-three in in some jsx component like in the code below, no rerenders on state changes are happening at all anymore. only the initial render is taking place. thought it could be react-router but that doesnt seem to be the problem either.