DevTool does not display children of components that doesn't call setState.
Everything works as expected with the firmata mock. To reproduce this you will need to have the actual hardware.
Tested in React Native DevTools inside Nuclide.
RH version: master
Hardware: Arduino UNO
Firmata: 0.11.3
Expected behavior
<Led>
<pin pin={9} value={1} />
</Led>
Actual behavior
Example that hides children
import React, {Component} from 'react';
import {getPort} from '../port';
import ReactHardware from '../../src';
class Led extends Component {
render() {
return (
<pin
pin={9}
value={1}
mode={'OUTPUT'}
/>
);
}
}
ReactHardware.render(
<Led />,
getPort(),
(inst) => {
console.log('Rendered <%s />', Led.name);
}
);
Example that shows children
import React, {Component} from 'react';
import {getPort} from '../port';
import ReactHardware from '../../src';
class Led extends Component {
constructor() {
super();
this.state = {value: 1};
}
componentDidMount() {
this.setState({value: 0});
}
render() {
return (
<pin
pin={9}
value={this.state.value}
mode={'OUTPUT'}
/>
);
}
}
ReactHardware.render(
<Led />,
getPort(),
(inst) => {
console.log('Rendered <%s />', Led.name);
}
);
DevTool does not display children of components that doesn't call
setState.Everything works as expected with the firmata mock. To reproduce this you will need to have the actual hardware.
Tested in React Native DevTools inside Nuclide.
RH version: master
Hardware: Arduino UNO
Firmata: 0.11.3
Expected behavior
Actual behavior
Example that hides children
Example that shows children