You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.
when calling 'toReact()' it mutates the faux element (at least it seems to delete some functions on the style property) and therefore the faux element can not be reused between renderings and has to be recreated on every render.
Does this not stop us from using the enter-update-exit pattern in d3 since we are always starting with a new faux element?
cheers,
mg
The text was updated successfully, but these errors were encountered:
Ah, there may be a small bug there because I was performing a clone before mutating that object, but you're not supposed to use enter-edit-update with this, no. The idea is that you build and throw away elements in each call to render so as to minimise state. The point in the faux DOM is that it's mutable and lightweight to make this a possibility.
I will investigate the mutation issue, but you shouldn't need update or exit. I only use enter in my examples for convenience, you could just iterate over your data too.
There may be a nicer way to get D3 to generate (for example) a <p> tag for every value in an array without the use of .enter().
Ah, so there's two issues here. The first is that I need to also manually clone the style object, apparently the clone operation is not recursive!
The other issue is that I only delete those properties if you haven't defined a key! Damn. Sorry to anyone that's been bitten by this. I'm aware of it now though and will fix it soon. Other things on my radar are event and mouse integration.. Still on the fence about animations, not sure how they work in D3 yet, may be impossible to bridge (easily), we'll see.
Hi,
when calling 'toReact()' it mutates the faux element (at least it seems to delete some functions on the style property) and therefore the faux element can not be reused between renderings and has to be recreated on every render.
Does this not stop us from using the enter-update-exit pattern in d3 since we are always starting with a new faux element?
cheers,
mg
The text was updated successfully, but these errors were encountered: