wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.44k stars 706 forks source link

TextField cannot be imported as RNUILib Package #903

Closed bjjeong closed 4 years ago

bjjeong commented 4 years ago

I'm am using react-native-ui-lib@5.12.4 and currently trying to import the TextField component like this:

import { TextField } from 'react-native-ui-lib/inputs';

However, I get a Cannot read property "TextField" of undefined error. Should I be importing from somewhere else? The component is clearly in /inputs as seen here.

davidstott commented 4 years ago

A work around is to create a textField.js file in root dir of react-native-ui-lib with this code: module.exports = require('./src/components/inputs/TextField').default; can then import like this: import TextField from 'react-native-ui-lib/textField'; Use patch-package to manage this patch.

ethanshar commented 4 years ago

Hi, This is duplicate of #881 And a fix will be released next version