3

I need little bit help. I am noob in react native.

I am creating a app which show pdf, all pdf are store in a web server.

I want to start downloading all those PDF in background when app start. So user does not have to wait it to download when he/she/it click on it.

Also, I am not good with redux yet. I am still learning it. And this application does not have redux implemented.

So please, can you explain how can I achieve this?

Comments
  • 2
    Google it for christs sake!

    Why do you even ask here?

    Here are some good websites to ask about programming stuff:

    https://stackoverflow.com

    https://www.quora.com

    https://www.reddit.com
  • 1
    Sorry, I don't really know Redux, so I can't help you with the implementation, but are you sure it's a good idea to download all the files locally?

    Think in terms of bandwidth (both in regards to your server and your clients' Internet connection), as well as regarding storage (on the client side). Also, how many files do you expect to have? This solution may work for a few files, but if you have hundreds of them?

    But of course, you can also make it an option the user can enable.
  • 0
    @HampusMa

    I tried googling it. I got many package about this like react native background fetch which runs both on iOS and Android. I got react native Fs and react native blob file system.

    I am just not sure how to combine all those.

    @CodeNoir

    They are only few PDF files. That's why I want to download them in background.
  • 0
    Heard about componentWillMount?
  • 0
    @leksyib if user click on new screen , does that will unmount the component and stop the download ?
  • 1
    @HampusMa he perhaps didn't want to post on stackoverflow to see an answer like yours. Really, can't you just guide a poor soul in need without giving out? Collect karma points man. World needs it :)
  • 0
    @aerfromenes I already searched google and everything before asking here.
Add Comment