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.

Force ReRender When .map Completes

See original GitHub issue

Hello,

I am trying to use the swiper by populating it with a variable number of components based on an array. However, it seems the swiper needs to be rerendered after the map completes.

const colorParams = {
  slidesPerView: 3,
  spaceBetween: 30,
  freeMode: true,
  rebuildOnUpdate: true
};
<Swiper {...colorParams}>
  {
    ColorOptions.map((color) => {
      return (
        <ColorCircle /> /* puedo component code */
      );
   })
 }
</Swiper>

I don’t see anything in the docs about this and am hoping I’m just missing something. All of my other testing looks to work fine up until I try to populate the slider with a map method.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
kirsantovcommented, Apr 14, 2019

It’s not working!

8reactions
osklarscommented, Oct 8, 2020

Neither props are recognized by react…

React does not recognize the rebuildOnUpdate prop React does not recognize the shouldSwiperUpdate prop

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to force re-render if map value changes? - Stack Overflow
I want to rerender this TableRow when the map ( props.aggregated ) is updated, I see in the console.log that props.aggregated is updating ......
Read more >
How to stop re-rendering lists in React? - Alex Sidorenko
Components always re-render ... First, let's simplify our example by removing all props from the Item . We will still update the parent...
Read more >
When does React re-render components? - Felix Gerschau
In React hooks, the forceUpdate function isn't available. You can force an update without altering the components state with React.useState like ...
Read more >
OpenLayers v7.2.2 API - Class: Map
Force a recalculation of the map viewport size. This should be called when third-party code changes the size of the map viewport.
Read more >
React Google Maps Api Style Guide
This is complete re-write of the (sadly unmaintained) react-google-maps library. We thank tomchentw for his great work that made possible.
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