Last active
January 2, 2020 15:44
-
-
Save nautilytics/406d6628033b26e552e3fb3a7ed3fb66 to your computer and use it in GitHub Desktop.
Comparing transitions in D3, React, and Angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// D3 | |
d3.selectAll(‘.marker’) | |
.data(data, d => d.id) | |
.enter(); | |
// Angular | |
<g app-marker *ngFor="let item of data; trackBy: trackByPoint"></g> | |
trackByPoint(item) { | |
return item.id; | |
}; | |
// React | |
data.map(item => { | |
return ( | |
<Marker key={`marker-for-${item.id}`} item={item}/> | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment