GithubHelp home page GithubHelp logo

Comments (7)

brentvatne avatar brentvatne commented on May 22, 2024

👍

from create-react-native-app.

usama54321 avatar usama54321 commented on May 22, 2024

Hi,

I was just going through the react native scripts and xdl libraries. Here is what I can understand so far. Please do tell me if I am missing something, as the documentation is a bit sparse and I might have missed something:

To get some kind of information about the last request, we will need to either hook into the xdl library, and pass in some kind of middleware to the express server being created here But this functionality is not present in xdl right now.

The other option will be to hook into the xdl Logs, and look for the last request, which I don't think is the most ideal of solutions.

The easiler solution however would be to just warm both caches at startup.

from create-react-native-app.

anp avatar anp commented on May 22, 2024

I suspect that the easiest way to do this is going to be to build something in xdl which makes use of the ProjectSettings API: https://github.com/exponent/xdl/blob/master/src/ProjectSettings.js. This information is stored in the project's .expo directory, so we can store information there about what platforms have been loading.

cc @jesseruder

from create-react-native-app.

usama54321 avatar usama54321 commented on May 22, 2024

Can you please clarify something, I'm sorry. Are we looking to warm the respective platform's cache when a user say runs npm run android/ios, or do we decide the platfrom based on the actual platform from which the app is accessed, i.e. an iphone or an android?

from create-react-native-app.

anp avatar anp commented on May 22, 2024

I think the ideal situation would be a combination:

  • On a fresh load, warm both caches
  • Record which platforms are being loaded, and on subsequent packager starts warm the most recently loaded platform
  • Warm the appropriate cache on yarn run android or yarn run ios regardless of what's been loaded most recently

from create-react-native-app.

jesseruder avatar jesseruder commented on May 22, 2024

Recording the last platform loaded in ProjectSettings sounds reasonable.

from create-react-native-app.

brentvatne avatar brentvatne commented on May 22, 2024

I think now that we have progress indicators this isn't a big deal. In the future we will also show the progress in the app as well. Closing this for now.

from create-react-native-app.

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.