codeforamerica / nyc-poverty-visualization

Benefits calculator / visualization tool created by the NYC 2016 fellows team as an introductory project.
MIT License
4 stars 3 forks source link

React is now split into two separate components that bind to different elements #44

Open cweems opened 8 years ago

cweems commented 8 years ago

@keithk Just FYI, if you look at index.js you'll see that the react app is now split into 2 components (https://github.com/codeforamerica/nyc-january-project/blob/master/src/index.js#L10)

This was the best way I could find to have some sections that could use Chart.js in some sections and react in others. If you and @amultiplied want to build something that passes data between the sections, you might make another component on top of index that passes props into the elements that are being bound there. Not a great solution but I think it'll work.

keithk commented 8 years ago

Taking a look at this now. Crazy that this is what had to be done, THANKS CHART.JS.

keithk commented 8 years ago

If we have to start passing down lots of data I'd probably just try to implement a store - but I'll take a look once we start working on this today to really dig into what's needed.