Comments (2)
Hi @jamesthomp - The torch cannot be started immediately during the first render as the camera has not been connected. I'm not sure what the use case would be for immediately starting the torch but you can use an effect to turn it on once the camera has rendered. The legacy camera can do this because of some inefficiencies in it's setup. These have been removed in the new package and as a side effect you will need to do it like this if you want this behaviour.
from expo.
Thanks for this explanation @alanjhughes. Is this behaviour of the props not applying if set before the first render exclusive to the torch prop or are there others that also need to be handled through the useEffect trick? It might be nice to add a warning to the documentation for anyone migrating given the difference in behaviour from the prior implementation.
In my case I "remember" the user preference for the torch, so if the torch was previously used then the torch prop is set even before the render, which is why I bumped into this when migrating
from expo.
Related Issues (20)
- I want a feature of implementing a Expo snack to debug some basic CSS of React Native Expo on WEB? Is there Any alternative platform to use it ? HOT 1
- [docs] Unresolved reference: Coroutine HOT 2
- how many builds in a month with free tier? and how can I increase the number of build monthly? how much does it cost? HOT 1
- is it possible to use expo-modules and create native cpp code? HOT 1
- Debugging in Chrome Dev Tools Support for Tunnel using ngrok in devices HOT 5
- React Native 0.75: in expo-dev-client crash HOT 5
- App crashes on getAssetsAsync when access is limited and no photos selected HOT 2
- Expo 51 Android build failed using Dev-Client HOT 8
- Expo-AV: Recorded sounds on Android cannot be played on iOS HOT 1
- FileSystem.readAsStringAsync not readable in iOS HOT 6
- Expo Chat application works on ExpoGo but the app keeps stopping when installed on device HOT 1
- Latests sdk version is incompatible with @testing-library/react-native
- How to disable "Unmatched Route" and handle deep links manually? HOT 1
- addNotificationResponseReceivedListener not getting triggered after notification is clicked HOT 1
- Android Expo Updates leads to ANRs HOT 1
- Android Expo Updates embedded assets ANRs HOT 5
- Sign android build when running locally HOT 1
- Integrity verification failed HOT 2
- Can't delete assets - deleteAssetsAsync() HOT 1
- exit 0 after npx expo run:android HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo.