Form runtime is a react container that let you to have dynamic forms based on design json schema.
# Prerequisites
You must have installed Expo And Native base in your application.
import FormRuntime from "react-native-form-runtime";
...
const formDesign = [
{
type: "Text",
field: "firstName",
label: "First Name"
},
{
type: "Number",
field: "age",
label: "Age"
},
{
type: "Picker",
field: "gender",
label: "Select Gender",
options: ["Male", "Female"]
}
];
...
_submit(formData: {}, ACTION: string) {
console.log(formData);
}
...
<FormRuntime
formDesign={formDesign}
type="submit"
submit={this._submit.bind(this)}
/>