Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element type is invalid: expected a string #5

Closed
pdavid0 opened this issue Jun 21, 2017 · 18 comments
Closed

Element type is invalid: expected a string #5

pdavid0 opened this issue Jun 21, 2017 · 18 comments
Assignees
Labels

Comments

@pdavid0
Copy link

pdavid0 commented Jun 21, 2017

import {AutoGrowInputText} from "react-native-auto-grow-textinput";

<AutoGrowInputText
        placeholder="placeholder"
        maxHeight={120}
    />
ExceptionsManager.js:63 
Element type is invalid: expected a string (for built-in components) 
or a class/function (for composite components) but got: undefined.
Check the render method.

R : 0.41.2
RN : 15.5.4

@rusfearuth rusfearuth self-assigned this Jun 22, 2017
@rusfearuth rusfearuth added the bug label Jun 22, 2017
@rusfearuth
Copy link
Owner

@pdavid0 Tnx for issue!

@joshuapinter
Copy link

Same thing here.

Just importing it and using <AutoGrowInputText placeholder='Some text here' />.

screenshot 2017-07-15 14 00 24

@rusfearuth
Copy link
Owner

@joshuapinter Could you show part of code?
How did you import library?

if you use import AutoGrowTextInput from 'react-native-auto-grow-textinput'; , it won't work.

@joshuapinter
Copy link

Gotcha! Because it's not the default, you have to put curly braces around it, like:

import {AutoGrowTextInput} from 'react-native-auto-grow-textinput';

I'll try that right now and report back.

@joshuapinter
Copy link

@rusfearuth Nope, same problem.

screenshot 2017-07-18 21 50 14

@marlti7
Copy link

marlti7 commented Jul 19, 2017

i have the same problem

@rusfearuth
Copy link
Owner

@joshuapinter could you share some code?

@rusfearuth
Copy link
Owner

Guys, Could you write RN versions? I've checked 1.1.2 on RN 0.43.x. It's work fine.

@joshuapinter
Copy link

@rusfearuth Not much code to share. It's about as basic as it gets.

import { AutoGrowInputText } from 'react-native-auto-grow-textinput';

// In my render#return()
<AutoGrowInputText />

Versions

"react-native-auto-grow-textinput": "1.1.2"
"react-native": "0.42.3"

@rusfearuth
Copy link
Owner

@joshuapinter Hm.. It's really strange. I can't repeat your case. Do you use flow for checking your code?

@joshuapinter
Copy link

@rusfearuth No, but it's isolated to just including <AutoGrowInputText />. I know how difficult it is dealing with issues that you can't reproduce so when I find more time I'll dig in deeper and try and find the root cause myself.

Let's leave this Issue open for now as a reminder, though.

@janaka120
Copy link

@rusfearuth, I got the same problem @joshuapinter had.
react-native-auto-grow-textinput: 1.1.2
RN 0.38
OS: Android 7.0
Device: samsung A5

@chuson1996
Copy link

Some here, try both import AutoGrowInputText from 'react-native-auto-grow-textinput'; and import {AutoGrowInputText} from 'react-native-auto-grow-textinput'; but none works

@jeremistadler
Copy link
Contributor

There is a bug in this package but the author did not accept my PR so I created a scoped package with a few fixes: @jeremistadler/react-native-auto-grow-textinput

@rusfearuth
Copy link
Owner

rusfearuth commented Sep 19, 2017 via email

@jeremistadler
Copy link
Contributor

@rusfearuth Reopened PR #6

@rusfearuth
Copy link
Owner

rusfearuth commented Sep 19, 2017 via email

@rusfearuth
Copy link
Owner

PR had been merged to master. You can find fix at v1.2.1.

PS. Tnx for PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants