leecade / leecade/react-native-swiper

Fetching Data from API Once with Load Minimal

Open
#1,309 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Which OS ?

MacOS

Version

Which versions are you using:

  • react-native-swiper v1.6.0
  • react-native v0.64
Expected behaviour

Fetching data once and not refreshing on swipe.

Actual behaviour

Reloads data from the API every time I swipe.

How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.

This is more of a question. I'm using loadminimal so that the previous and the next slide is loaded in advance but I'm also loading data from the API when the components become visible. I'm wondering what is the best way to implement a call from the API but only once, so that even when I swipe, it isn't reloading the data from the API.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not identify a source file or test; it refers to loadMinimal, API calls on component visibility, and an example in the examples folder. Start by reproducing the reload while swiping and inspect the example's visibility and data-fetch behavior. Done means the API data is fetched once rather than on every swipe.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.