3 ms·
Our UI for Marathon[1], a framework on top of Apache Mesos, is written in React and uses Backbone models. It uses Require JS for modules and compiling the sourc
by ssorallen 12y ago
Our UI for Marathon[1], a framework on top of Apache Mesos, is written in React and uses Backbone models. It uses Require JS for modules and compiling the source into a single file for distribution. The JS root is in the assets directory[2].
There are a few guidelines we have adopted through trial and error so far:
* Use React.addons.classSet[3] liberally. Class name generation becomes simpler for future developers to read.
* Define propTypes[4] for every component. Debugging becomes easier because React gives you informative warnings about mismatched propTypes.
[1] https://github.com/mesosphere/marathon https://github.com/mesosphere/marathon
[2] https://github.com/mesosphere/marathon/tree/master/src/main/resources/assets/js https://github.com/mesosphere/marathon/tree/master/src/main/...
[3] https://facebook.github.io/react/docs/class-name-manipulation.html https://facebook.github.io/react/docs/class-name-manipulatio...
[4] https://facebook.github.io/react/docs/reusable-components.html#prop-validation https://facebook.github.io/react/docs/reusable-components.ht...