Skip to content
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

Proxy singleton #2

Open
mfulton26 opened this issue Dec 8, 2020 · 0 comments
Open

Proxy singleton #2

mfulton26 opened this issue Dec 8, 2020 · 0 comments

Comments

@mfulton26
Copy link
Owner

if FullStoryExcluder instances are repeatedly created some memory and/or performance issue could arise

React.createElement is wrapped with a Proxy and unwrapping it isn't feasible (some other code may have wrapped it too so restoring the previous value doesn't work and a revocable proxy is no longer usable)

instead of creating a unique proxy instance per FullStoryExcluder instance it might be better to have a singleton proxy used by each FullStoryExcluder instance

Note: the README makes it clear that FullStoryExcluder is meant to be initialized at the root of the app but some users might want to manage separate lists of exclusion strings and do so through nested and/or multiple FullStoryExcluder instances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant