leecade / leecade/react-native-swiper

this.state inside onMomentumScrollEnd handler is undefined

Open
#286 2 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

Hi,
I must be misunderstanding something basic and I apologize if this is the case, but I spent a few hours trying to get to this.state of the component that renders Swiper on swipe. I am doing this to keep history of swiping.
<Swiper style={swiperStyles.wrapper} height={160} onMomentumScrollEnd ={this._onMomentumScrollEnd}
what am I doing wrong and how can I do what I need to be done?
Thanks in advance.

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

Start with the Swiper component's onMomentumScrollEnd callback and the caller's _onMomentumScrollEnd handler. Reproduce the undefined this.state behavior in a React Native example, then determine whether the callback behavior needs a code change or clearer documentation. Done means the handler's state access behavior is established and covered by an appropriate check or explanation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.