import Button from '../../button'; import Field from '..'; import Input from '../../input'; import React from 'react'; import ReactDOM from 'react-dom'; interface PageStates { show: boolean; show2: boolean; } class Demo extends React.Component<{}, PageStates> { field: Field; field2: Field; constructor(props) { super(props); this.state = { show: true, show2: true, }; this.field = new Field(this); this.field2 = new Field(this, { autoUnmount: false }); } render() { return (
{this.state.show ? ( ) : null}

{this.state.show2 ? ( ) : null}
); } } ReactDOM.render(, document.getElementById('field-demo-9'));