Giter Club home page Giter Club logo

Comments (2)

alanjhughes avatar alanjhughes commented on September 25, 2024

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.

jamesthomp avatar jamesthomp commented on September 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.