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

Fading in? #29

Closed
nc opened this issue Oct 14, 2015 · 6 comments
Closed

Fading in? #29

nc opened this issue Oct 14, 2015 · 6 comments

Comments

@nc
Copy link

nc commented Oct 14, 2015

Hey,

Awesome work on this.

Tried using Animated with the BlurView but it returns Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

Wrapping in view that animates opacity doesn't work either.

Any suggestions?

@Kureev
Copy link
Owner

Kureev commented Oct 14, 2015

Can you provide an example code?

@jevakallio
Copy link

Just a guess, but the error message sounds quite similar as the one you get when you forget to access the .BlurView property of require('react-native-blur') and your local variable ends up pointing to the wrapper object instead.

@chanange
Copy link

I got the same error message when I didn't access the .BlurView property too.

var BlurView = require('react-native-blur').BlurView;

@Kureev
Copy link
Owner

Kureev commented Oct 21, 2015

@nc @chanange react-native-blur contain native Obj-C implementation. Are you sure you linked them correct? (see https://github.com/Kureev/react-native-blur#installation)

@chanange
Copy link

Yep I linked the RNBlur project and added the libRNBlur.a product to the Build Phases - Link Binary with Libraries.

I got the error message when I imported the module with the following import, as described in the README:

var BlurView = require('react-native-blur')

But accessing with the .BlurView property works.

var BlurView = require('react-native-blur').BlurView

@Kureev
Copy link
Owner

Kureev commented Oct 23, 2015

@chanange In the docs I use

const { BlurView, VibrancyView } = require('react-native-blur');

which is equals to

const BlurView = require('react-native-blur').BlurView;
const VibrancyView = require('react-native-blur').VibrancyView;

so it seems everything is fine.

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

No branches or pull requests

4 participants