Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: React (http://facebook.github.io/react/) is a new library that Facebook released last week and it seems awesome. It's designed for defining components declaratively and helps out with a lot of the stuff that we were doing by hand before, like only updating the DOM when necessary. I converted everything except interactive-graph (which I just haven't gotten to yet). This is 350 lines shorter (not counting React itself) and much much more responsive (on my computer, rerendering when editing a hint takes around 2ms per keypress instead of 60ms previously (!) because lots of DOM manipulation and other recalculation is avoided). Test Plan: Used test.html. Added hints. Removed hints. Added widgets to the question. Modified widget properties (e.g., input-number width) and saw the preview update. Added radio choices. Used testrender.html. Called zk.scoreInput() in the JS console and got results appropriate for the radio choices I selected. Called zk.showHint() and hints appeared. Reviewers: eater, alex Reviewed By: alex CC: joel, jakesandlund Differential Revision: http://phabricator.khanacademy.org/D2510
- Loading branch information