question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue importing 'Input' component

See original GitHub issue

Description

  1. Explain what you did Trying to use ‘Input’ element
  2. What you expected to happen Should be hassle free experience to import and use it, but ended with the error
  3. What actually happens Invariant Violation.Element Type is invalid

Also please include the version of react-native-elements that you are using. “react-native-elements”: “0.19.0”

Reproduction Steps and Sample Code

https://snack.expo.io/By8z_AqHf

When the module was installed inside react-native-elements/src/input folder there was no file input.js, however in https://github.com/react-native-training/react-native-elements the same input.js file is seen under react-native-elements/src/input folder.

screen shot 2018-01-25 at 10 08 59 pm

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
mlchildcommented, Jan 28, 2018

I fixed this by using “FormInput” instead of “Input”, but not sure if this is recommended

4reactions
xavier-villelegiercommented, Jan 28, 2018

@repl-ullas-ml You’re looking two different versions of RNE. On github the v1.0.0-beta is on master, but your version is the v0.19.0.

On the v0.19.0: • You must import FormInput

On the v1.0.0-beta: • The FormInput has been refactored and renamed, and is now exported as Input.

So @mlchild, if you’re on v0.19.0, you must use FormInput, as you did 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import Input component with v0.19.0 #1025 - GitHub
Descripwtion. i imported Input = import { Input } from "react-native-elements";; i used the component i exepected to work; actually an error occured....
Read more >
Cannot import my custom components in Angular
One thing to point out, if your Input component has a module, import that module inside the Widgets module (and then export it...
Read more >
Using Material UI with React Hook Form - LogRocket Blog
React Hook Form exports some utility from the famous useForm Hook, which you then use inside your input components. First, import the useForm ......
Read more >
Set the value of an Input component.
Topic : Set the value of an Input component. ... Arnoud import React from "react"; import {Input, Button} from 'mdbreact'; export class InputTest...
Read more >
react-phone-number-input - npm
"With country select" component imported from react-phone-number-input/core subpackage doesn't have default values for the following properties:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found