Code Monkey home page Code Monkey logo

Comments (6)

DanielJDufour avatar DanielJDufour commented on June 2, 2024

@jlow81 , if this happens to you again, could you note exactly the order of progression through the pages. I am having a hard time duplicating and I think this bug has to do with the order at which you step through the pages. Thanks! :-)

from code-gov-front-end.

DanielJDufour avatar DanielJDufour commented on June 2, 2024

I've run into this bug again today. It's the same problem causing #48. I'm working on coming up with a fix now

from code-gov-front-end.

DanielJDufour avatar DanielJDufour commented on June 2, 2024

Issue is that connected-react-router is not registering changes to the window.location into the router in the Redux store when a user clicks a Link, only when we use the push function.
image

In other words, ConnectedRouter does not appear to be working. react-router and connected-react-router don't appear to work together: https://reacttraining.com/react-router/web/guides/redux-integration
I tried the workaround hear and it didn't work.

One solution may be to implement a shouldComponentUpdate and check properties of match object.

from code-gov-front-end.

DanielJDufour avatar DanielJDufour commented on June 2, 2024

Workaround mentioned above doesn't appear to work either:
image

I'll think on this and update the ticket when I have a next step. It will probably involved listening to events somehow or creating a custom CustomLink component that basically wraps around a Link component from the react-router library

from code-gov-front-end.

DanielJDufour avatar DanielJDufour commented on June 2, 2024

I tried doing this with this.props.location, which I believe is provided by react-router-dom and that didn't work. What's probably easiest is to just store the pathname in the state and check to see if that changes. Will try that and if that doesn't work, maybe work on wrapping Link and NavLink

from code-gov-front-end.

DanielJDufour avatar DanielJDufour commented on June 2, 2024

Fixed. Solution was hacky, but works.

from code-gov-front-end.

Related Issues (20)

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.