import React from 'react'; import Module from '../lib/Module'; import {StyleSheet ,TextInput, View, Button } from 'react-native'; import Types from '../lib/Types'; export default class FormComp extends Module { constructor(props) { super(props); this.state = { } this.submit = this.submit.bind(this) } submit(e){ e.preventDefault() return this.state } display() { let { inputsNum, ButtonText, ButtonColor, container } = this.props if(!inputsNum) inputsNum = 2; let Inputs = []; for(let i = 0; i { state[key] = text; this.setState(state)}} value={this.state.key} placeholder={'placeholder'} /> Inputs.push(input); } let fn = this.props.submit || this.submit return ( {Inputs}