esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 83 forks source link

undefined is not an object when importing fresh install #70

Closed dukuo closed 6 years ago

dukuo commented 6 years ago

Hi! i'm trying to yarn add react-native-clean-form then import it on a component but just by doing

import { ActionsContainer, Button, FieldsContainer, Fieldset, Form, FormGroup, Input, Label, Switch } from 'react-native-clean-form'

but I get this message about Button.js:99:28 failing at PropType checking or something like that.. Am I doing something wrong here?

23439477_10155906959754511_1130212037_n

markusguenther commented 6 years ago

Guess you have a latest RN version and they have no build-in prototype.

The pull-request should help you. https://github.com/esbenp/react-native-clean-form/pull/69

Can not promise something but can try to checkout the PR at the evening and merge it if everything is OK. But at the moment my time is really limited and I am not able to release the Github version on NPM. Only @esbenp can do that.

booleanBoy commented 6 years ago

I have this problem also. I downloaded the zip version of that pull-request and replaced the contents of node_module\react-native-clean-form with it. Now I have a similar but new error: undefined is not an object (evaluating '_reacr2.edfault.PropTypes.bool') which is in createInputCreator.js at line 45

Am I not using the pull request properly, or is this another issue the changes in RN v0.50? Thanks!

andrewslater commented 6 years ago

@booleanBoy A comment in #69 indicates createInputCreator is still not migrated to use the prop-types package as required by React 16. Sounds like the fix is in the works though.

leoskyrocker commented 6 years ago

Could you kindly help merge the PR which fixes this @markusguenther, and release a new version on npm @esbenp? Would really appreciate it.

UPDATE: I've fixed createInputCreator as well in a new PR https://github.com/esbenp/react-native-clean-form/pull/71.