by danso · 7y ago · 0 comments
<svg
width={width}
height={height}
>
{geoJson.features.map(feature =>
<path
key={`path-${feature.properties.bfsId}`}
stroke='white'
strokeWidth={0.25}
d={path(feature)}
fill='steelblue'
/>
)}
</svg>
I was thinking maybe React was also used with this visualization in production (e.g. adding interactive elements for a published story), and so maybe the author found it easy to use React for the rendering too?To me this is more readable and easy to understand, but you don't really need react to do any of this. This can also be done with plan js.
Fast and easy to start and expand as needed.