question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slides from array

See original GitHub issue

Which OS ?

iOS and Android

Version

Which versions are you using:

  • react-native-swiper 1.5.13
  • react-native v0.54

Expected behaviour

If i pass array of components i expect to have as much slides as there are componets.

Actual behaviour

I get one slide with all components rendered there.

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.

Steps to reproduce

You can just create this simple code snipet: `<Swiper key={slideIndex} height={0} ref={(ref) => this.swiper = ref} loop={false} index={slideIndex} showsButtons={false} showsPagination={false} scrollEnabled={true} bounces={false} >

        {[1, 2, 3 ,4].map(data => {
          return <View><Text>{data}</Text></View>
        })}

      </Swiper>`

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
SmirnovWcommented, May 4, 2020

@kenobi91 you sir, saved a ton of my hours and nerve cells! Many thanks!!! 👍

1reaction
kenobi91commented, May 4, 2020

Hi @SmirnovW, yes problem i solved. I just extracted all slides in one rendr function that returnes array and it works now. I think problem was that i had some default slides and then function that adds dinimic ones.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrays and Slideshows - Computer Science - Wellesley College
We'll have an array of URLs, one for each picture we want to show. We'll call that slides . We'll have a global...
Read more >
Slide Show using JS array - javascript - Stack Overflow
Slide Show using JS array ; have you tried build the relative path to it? What error do you get? – Aalexander. Jan...
Read more >
Arrays Powerpoint Teaching Resources - TPT
This is a 15 page animated powerpoint presentation introducing students to the concept of using an array to help to solve multiplication ...
Read more >
Google Slides - Array
JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload. Arrays! in real life….
Read more >
Chapter 6: Arrays
Chapter 6: Arrays. Presentation slides for. Java Software Solutions. Foundations of Program Design. Third Edition. by John Lewis and William Loftus.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found