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

Didn't work for me, nothing rendered on the screen! #1

Closed
hack-and-backslash opened this issue Mar 5, 2019 · 12 comments
Closed

Didn't work for me, nothing rendered on the screen! #1

hack-and-backslash opened this issue Mar 5, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@hack-and-backslash
Copy link

I was looking for such a thing since a week now and found this one. Unfortunately, it doesn't work for me. Neither does it throw any errors or log anything to the console.

Using:
"react": "16.6.3",
"react-native": "0.58.6",
"react-native-confetti-cannon": "^1.0.2",

@VincentCATILLON
Copy link
Owner

VincentCATILLON commented Apr 1, 2019

Hey @hack-and-backslash sorry for the response delay.

I'll spend time to understand why it doesn't work on your own app.

Can you copy past the component using this lib ?

Mine is:

import * as React from 'react';
import {View, StyleSheet} from 'react-native';
import ConfettiCannon from 'react-native-confetti-cannon';

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

const MyScreen = () => (
  <View style={styles.container}>
    <ConfettiCannon count={200} origin={{x: -10, y: 0}} />
  </View>
);

@hack-and-backslash
Copy link
Author

hack-and-backslash commented Apr 1, 2019

I am doing the same thing. Nothing gets rendered on screen for me.

Here's my class:

export default class App extends Component {
render() {
return (

<ConfettiCannon count={200} origin={{ x: -10, y: 0 }} />

);
}
}

@VincentCATILLON
Copy link
Owner

VincentCATILLON commented Apr 2, 2019

Ok i'll see it ASAP.

Are you sure that you have a View wrapping the ConfettiCannon component with a height and width stuck to your window edges ?

Edit: my comment above has been updated to explicit the flex: 1 style for the container. Confirme me that you have the same integration please.

@Tracklous
Copy link

In ios, it is working fine but in android its show nothing. I guess fragment is causing some problem to render any confetti.

@VincentCATILLON VincentCATILLON added the bug Something isn't working label Apr 5, 2019
@VincentCATILLON
Copy link
Owner

VincentCATILLON commented Apr 5, 2019

Hi @Tracklous & @hack-and-backslash i'm reproducing your issue locally.
With 0.59, there is no issue with Android.

I'm looking to fix this ASAP and release a patch for this and back to you.

Don't know if it's related to this fix (in 0.59): facebook/react-native#18872

@VincentCATILLON
Copy link
Owner

Ok guys, I identified the root cause.

In debug mode, it's working, but not without debug mode. It seems that it's related to facebook/react-native#18426

I'll find a workaround or change the code to fix this. Stay tuned

@VincentCATILLON
Copy link
Owner

VincentCATILLON commented Apr 5, 2019

@hack-and-backslash @Tracklous a new version was published (1.1.2).
Please upgrade your lib and tell me if it's fixed on your project :)

yarn upgrade react-native-confetti-cannon@^1.1.2

@Tracklous
Copy link

Hi! @VincentCATILLON ,

It is running on Android now, but after the little fix " Array(count).fill(count).map(...." I've to give the args to the fill() function so I just passed the count in it. But there are also some performance issues whenever I put the count to greater than 70-80 confetti's then it performs the animation in <60 FPS.

Anyways thanx for the quick response.

@VincentCATILLON
Copy link
Owner

Yes, i think it depends on device CPU. We could use useNativeDriver for best performances but some transformations properties are not supported yet for this: top, left and rotateZ.

The solution could be to make it natively and expose it to JS through RN bridge.

@VincentCATILLON
Copy link
Owner

I'm closing the issue if it's right for you so :) Have a great day

@hack-and-backslash
Copy link
Author

@hack-and-backslash @Tracklous a new version was published (1.1.2).
Please upgrade your lib and tell me if it's fixed on your project :)

yarn upgrade react-native-confetti-cannon@^1.1.2

Eveything seems fine now. Thanks.

@jhoanborges
Copy link

Same issue. I'm using react-native-confetti-cannon@^1.1.2 and React native 0.59.10

david-alza referenced this issue in Alza-app/react-native-confetti-cannon-fork Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants