cdglabs / apparatus

A hybrid graphics editor and programming environment for creating interactive diagrams.
http://aprt.us/
MIT License
1.04k stars 59 forks source link

Upgrade to React 0.14 #39

Closed joshuahhh closed 8 years ago

joshuahhh commented 8 years ago

This was easy to do, and it helps for compatibility with external React components we might want to add, so let's do it! I poked around, and Apparatus still seems to work, so that's good. I eliminated all console errors / warnings I found. Please take a look!

Notes:

electronicwhisper commented 8 years ago

Cool. Let me mention considerations with the build process:

  1. I had put react.js and react.min.js in that thirdparty folder because I wanted to be able to easily switch between using one or the other. react.js is good when you need to see the React warnings, but react.min.js has significantly different performance characteristics, in my experience, so I often want to be using this version if I'm trying to figure out performance aspects of Apparatus.
  2. I would like it if the build process were faster. This is why I had made the vendor.js thing. This helps, I think, but it's still slow. I think ideally it would build within 0.5s of changing a file in src. Maybe a newer version of watchify is faster?
  3. I would like it if it were easier to distribute a built Apparatus. What I mean is, I would like to be able to copy a few files into a folder on Dropbox and then email a working link (as I did last week with the simulation prototype). Right now to do this you need to copy index.html, dist, thirdparty, and then also codemirror from node_modules, because the css makes a reference to this. That last one is clearly annoying.

So, I had actually planned to get rid of vendor.js, and just put all the third party libraries in thirdparty and have index.html reference those. That seemed like the easiest way to satisfy the above three considerations. But I don't really care what build process we use as long as the above considerations are addressed.