There is an Input component:
import {h} from "preact"; const Input = ({children, ...rest}) => (<input {...rest}>{children}</input>); export default Input; I do everything on Preact There is a device object that has the properties staIP, staMS, staGW
onIPInput( par, event ) { } render({}) { const {device, linkState} = this.context; const {staIP, staMS, staGW} = device; return ( <div> <Input value={staIP} type="text" onChange={this.onIPInput.bind(this, "staIP")}/> <Input value={staMS} type="text" onChange={this.onIPInput.bind(this, "staMS")}/> <Input value={staGW} type="text" onChange={this.onIPInput.bind(this, "staGW")}/> </div> ); } It is necessary that it was possible to enter only an IP address in the format xxx.xxx.xxx.xxx . If you put type = text , you can enter anything.
Help to add the onIPInput function.