react-hardware icon indicating copy to clipboard operation
react-hardware copied to clipboard

POC: <board /> component

Open iamdustan opened this issue 9 years ago • 0 comments

Or really support for any component that has an async mounting period before it can render it’s children. I have no idea how this will impact the codebase, but I imagine it will be slightly invasive.

React’s future incremental reconciler could be really interesting for this.

Strawman API that would be supported by this:

const App = (
  <container>
    <board port="/dev/cu.usbmodem1451" pinMapping={arduinoUnoPinMapping}>
      <Led pin={2} value={this.state.value}
    </board>
    <board port="/dev/cu.usbmodem1455" pinMapping={raspberryPiPinMapping}>{...}</board>
    <board port="/dev/rfcomm0">{someComponentsOnABluetoothConnectedDevice}</board>
  </container>
);

Use case is that full board configurations now become composable without needing an outside state management system other than setState.

iamdustan avatar Apr 22 '16 14:04 iamdustan