Giter Club home page Giter Club logo

Comments (4)

andrew-nguyen avatar andrew-nguyen commented on May 23, 2024

@binora I am having a similar issue - which version of the lib are you using? Did you ever figure out what was causing this?

from cljs-react-navigation.

binora avatar binora commented on May 23, 2024

@andrew-nguyen i was using version 0.1.1. I couldnt solve it. This wasnt a bug in this library but react-navigation itself I think. This is a simliar issue : react-navigation/react-navigation#2904

from cljs-react-navigation.

andrew-nguyen avatar andrew-nguyen commented on May 23, 2024

@binora Thanks for the link. One thing I've noticed (using 0.1.3) is that the double-rendering only occurs in one of two situations for me:

  1. After a figwheel reload (a button that was rendering only once prior to the reload is now double-rendering)
  2. If I specify a stack of screens in a re-frame event and then navigate to that stack of screens

from cljs-react-navigation.

andrew-nguyen avatar andrew-nguyen commented on May 23, 2024

Not sure if this explains the behavior or if it's the correct fix but here's what I've done with my fork:

  1. re-frame app-db stores clojure data structures (I did this primarily because I use the params feature to pass data to subsequent screens and ended up with a mix of clojure and js data structures within app-db. It seemed that always storing clojure structures and converting to js when necessary was the best path.)
  2. cljs-react-navigation.re-frame functions have been changed to explicitly convert to js data structures (and back to clojure data structures when saving to app-db)
  3. All of my downstream code now uses (dispatch-sync :cljs-react-navigation.re-frame/navigate ...) to navigate instead of the functions contained within the props

Everything generally appears to be working as expected.

@seantempesta If this makes sense, I'm happy to clean up my fork and submit a PR

from cljs-react-navigation.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.