Clint Ayres

Results 99 comments of Clint Ayres

I'll try to sketch an example of a way to do this. Basically you need the parent to control the children; make your children pure (defined fully by their props.)

In this way the state is controlled at the parent and the validation methods are passed to the children but bound to the parents. I'll put an example together tomorrow.

Ok, in that case we have the issue of the parent having a **getValidatorData** method but the children having the data. This can be solved a few ways. Basically, you...

And the spec for the _Input_ component can be found here: https://github.com/react-bootstrap/react-bootstrap/blob/master/test/InputSpec.js#L56

_Well...now I'm thinking there may be a caveat here. Still looking for a better example._

``` js componentDidMount: function() { this.refs.input.getValue(); //yolo }, render: function() { return ( ); ```

In this example you pass the handleValidation down to the children and expose the state to the parent. Now you can call `this.props.isValid()` before submit. ``` js getValidatorData: function() {...

Maybe provide a simple parent child example so I can see exactly what your doing and advise more specifically. But, if you need control flow on async actions, just wrap...

[is()](https://facebook.github.io/immutable-js/docs/#/is) is essentially a deep value compare of the Immutable object.

The problem with your assertions is that your creating two Javascript (not immutable) objects and calling Immuable.is(), which should be false. ``` javascript var a = {} var b =...