Breaking down react files



I just finished your leaning react book. I started in on a “larger” project and it quickly is getting messy.

Is there a way to break each React.createClass(

into its own file and import it?



Yes there is! I am in the process of covering that in the 2nd edition, but here is the first step:

You can break up all of your components into individual classes. The example in that tutorial and the others listed under Learning By Doing should help you further:



Thanks, exactly what I needed. And the book was great btw :slight_smile: