React-native-paper: Card.Title throws Invariant Violation: Element type is invalid

Created on 6 Feb 2019  路  3Comments  路  Source: callstack/react-native-paper


Current behaviour

When using <Card.Title title='Hello' />, throws the following error:

Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Expected behaviour

<Card.Title title='Hello' /> would display the title as "Hello".

Code sample

This is the Snack.Expo.io that is in the documentation. It occurs here as well.

Screenshots (if applicable)

screen shot 2019-02-06 at 2 46 53 pm

What have you tried

Removing solves the problem. Also looked in the node_module folder and found that Card.Title is not being exported, and is entirely missing. The documentation should be updated to reflect this.

All 3 comments

Card.Title was introduced only 10 hours ago... I don't think it made it into npm yet.

Card.Title was introduced only 10 hours ago... I don't think it made it into npm yet.

Kinda odd that the public documentation mentions it, then.

@ShaggyKris What version of paper do you use? Card.Title is available in 2.11.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scottybo picture scottybo  路  3Comments

tonyxiao picture tonyxiao  路  3Comments

navedar picture navedar  路  4Comments

mihaidaviddev picture mihaidaviddev  路  3Comments

makhataibar picture makhataibar  路  4Comments