Closed tom-bywild closed 1 year ago
Thank you so much @tom-bywild . This is such an amazing fix. Really appreciate your help on this.
And sorry for the late response - I forgot to check notifications :)
And yes, I think we should probably move this to a monorepo, because I'm also working on a complementary library for Pts, so it'll be good to have everything in one place. Thanks again @tom-bywild !
Goals
This PR should fix the infinite recursion happening with
react-pts-canvas
(https://github.com/williamngan/react-pts-canvas/issues/94). It applies the fix suggested at https://github.com/pixijs/pixijs/pull/9093. The issue seems to be caused by calling super conditionally, therefore I collect the params forsuper
and call it only once at the end.How I tested the fix:
react-pts-canvas
pts
pts
, then rannpm run build
npm i
inreact-pts-canvas
, copied over thedist
from build intonode_modules/pts
, then rannpm run build
npm i
in the/example
atreact-pts-canvas
, copieddist
intoexample/node_modules/pts
, then rannpm start
Further thoughts
I think
pts
would be simpler to maintain if using a mono repo for the core-lib (this repo) and all derivates (e.g. react). This would also be an opportunity to provide a consistent wording for the packages, e.g.@pts/core
,@pts/react
, etc. But those are just thoughts that I just wanted to share.