ForbesLindesay/react-jade — pull request #19 by jeromew (2014-08-11 15:48:24+00:00)
Title: Reactjs native components / function render() {}

Here is a PR following discussion on #1 and #15.

This PR's objective is to find an acceptable API in order to use react-jade to define the `render` function of a Reactjs component per http://facebook.github.io/react/docs/component-specs.html

since the lifecycle of a native Reactjs component is managed with `this`, `locals` is used as a library of subcomponents.

the commit https://github.com/jeromew/react-jade/commit/c9613bb348abab70f298e3c83753a539f3169903 implements the compileRender mechanism + subcomponent tests

it is based on https://github.com/jeromew/react-jade/commit/6e47c82765e5da2cae8db73c60a72863e17417e6 which preserved `this` in the compiled jade template function.