-
Notifications
You must be signed in to change notification settings - Fork 119
feat: wrapEffect disposal & root context #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: wrapEffect disposal & root context #179
Conversation
I'm working on updatin rpp (#180) by the way and I'll try to sync it up with your PR @CodyJasonBennett |
I can rebase/redo this one, too. I think there's a less invasive way to do this that isn't breaking. |
Copy-pasted code to the demo (I used it for my PR also) - works flawlessly: https://codesandbox.io/s/ancient-sky-ldkxwk?file=/src/App.tsx |
@CodyJasonBennett is this ready for merging? |
I'll need to create sandboxes for each of the linked issues to confirm they're good to close, then yeah. |
Is there any hope of getting this one over the line @talentlessguy @CodyJasonBennett ? This looks like a major upgrade to rpp flexibility! |
@chasedavis sorry for the waiting, the sandboxes aren't ready yet... but if you'd like this to be merged quicker, help is appreciated! we need to create a code sandbox (or multiple) to test if all the effects are working correctly I'll create a checklist |
|
@talentlessguy do we need all of them before we can merge? |
@drcmda I refactored this to be less invasive. This is good to merge. |
ok then merging, if something breaks we can reopen issues |
Fixes #25
Fixes #42
Fixes #132
Fixes #157
Fixes #173
Creates a private element identifier via
extend
rather than the use of hooks/primitive since the latter does not dispose nor is managed by React. Consequently, wrapped effects can use the full featureset of React and R3F, includingargs
andattach
. I've defined getters/setters for any prop aliases and camera defaults from host context for effects that need them.