gaearon / react-deep-force-update

Force-updates React component tree recursively
MIT License
122 stars 19 forks source link

Don't expose internal info #8

Open gaearon opened 7 years ago

gaearon commented 7 years ago

Looking at #6 again, I understand now that onUpdate and shouldUpdate "leak" internal instances to the user code. Can we please avoid this? Let's change the code to take the limited amount of information you need (e.g. an object containing the fields you're interested in). We can add more fields but I don't want to make internal structure exposed.

@bfiss Could you please change this?

gaearon commented 7 years ago

That would also make it work identically with both Stack and Fiber. Current code will pass different things depending on the engine.