sahlhoff / react-native-pulse

React Native Pulse Animation
MIT License
149 stars 49 forks source link

Invariant Violation error on install #15

Closed maxbeech closed 6 years ago

maxbeech commented 6 years ago

Hey!

Love the animation - but having a bit of issue adding it. I keep getting the following error whenever I add the const Pulse = require("react-native-pulse") line.

Any help much appreciated!

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

simulator screen shot - iphone 6 - 2018-08-14 at 18 14 52

maxbeech commented 6 years ago

Fixed this with .default at end of require statement.

aGORyan commented 5 years ago

Suggest documentation update:

const Pulse = require('react-native-pulse').default;

maxbeech commented 5 years ago

Great shout @aGORyan - I have submitted a pull request.