Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Backbone JS rendering twice

  • I am working on an app using Backbone JS, and I’m experiencing a problem, whereby the app fires render twice on collection read.

    The app displays fictitious “company profiles”, whose data is provided by this JSON file.

    I used the Bootstrapping approach to have the data available when rendering the page.

    When you run the app, it displays the first company profile, and you can go to the next one on leftswipe. Similarly, you can display the previous one on rightswipe. Well, at least this is what is supposed to happen, but 😞 … see what’s actually happening below

    Cordova Backbone App Demo -- Multiple Rendering Problem

    The code is on Github. I Need help in fixing the problem of the app rendering twice, which results in “skipping” one item when swiping, as seen in the GIF above. Thanks.

  • I have since fixed the problem and updated the code and GIF, thanks to this answer on stackoverflow and this other answer, also from stackoverflow. 😎