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

✨ Use torch with ReactMethod #2737

Closed
2 tasks done
eloisp opened this issue Apr 12, 2024 · 1 comment
Closed
2 tasks done

✨ Use torch with ReactMethod #2737

eloisp opened this issue Apr 12, 2024 · 1 comment
Labels
✨ feature Proposes a new feature or enhancement

Comments

@eloisp
Copy link

eloisp commented Apr 12, 2024

What feature or enhancement are you suggesting?

Hi,

Is there an easy way to set the torch on and off using a react method (using a useRef) and not the props ?
The props trigger a render that I don't want. I want to play with the torch without any render.

What Platforms whould this feature/enhancement affect?

iOS, Android

Alternatives/Workarounds

Set the props is too slow

Additional information

@eloisp eloisp added the ✨ feature Proposes a new feature or enhancement label Apr 12, 2024
@mrousavy
Copy link
Owner

Hey - nope, it is a prop. You can use Reanimated SharedValues if you want to avoid triggering a re-render, although a re-render isn't as bad as it sounds (unless your component is not organized very well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature Proposes a new feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants