+
+## [willReceiveProps - JSX](#will_receive_props)
+
+The `willReceiveProps` lifecycle method allows for hooking into the props
+lifecycle of JSX components. Let's take the following JSX component for example.
+
+```javascript
+import JSXComponent from 'metal-jsx';
+
+class MyJSXComponent extends JSXComponent {
+ render() {
+ return {this.props.foo}:{this.state.bar}
+ }
+
+ willReceiveProps(changes) {
+ if (changes.foo && changes.foo.newVal !== changes.foo.prevVal) {
+ // This will available in the next render
+ this.state.bar = 'bar1';
+ }
+ }
+}
+
+MyJSXComponent.STATE = {
+ bar: {
+ value: 'bar'
+ }
+};
+
+MyJSXComponent.PROPS = {
+ foo: {
+ value: 'foo'
+ }
+};
+
+export default MyJSXComponent;
+```
+
+If we render this component and change the value of the `foo` prop, the
+`willReceiveProps` method will be invoked before the component renders allowing
+us to also set the value of internal state values that will also be passed to
+the next render.
+
+```javascript
+import MyJSXComponent from './MyJSXComponent';
+
+const component = new MyJSXComponent();
+
+component.props.foo = 'foo1';
+
+component.once('rendered', function() {
+ console.log(component.element.innerHTML);
+
+ // component.element.innerHTML === 'foo1:bar1';
+});
+```
+
\ No newline at end of file