GithubHelp home page GithubHelp logo

Comments (2)

DunhamGitHub avatar DunhamGitHub commented on June 26, 2024

importing withRouter from react-router
...and...
changing export default Home; to export default withRouter(Home); eliminated the error.
But is that the proper solution?

Screenshot 2024-03-21 at 16 59 12

from ionic-docs.

liamdebeasi avatar liamdebeasi commented on June 26, 2024

Thanks! There looks to be some missing information in this quick start guide. The RouteComponentProps type is correct because the guide is trying to demonstrate how the history object can be passed as a property instead of having to call useHistory. However, withRouter is required in order to do this, but it's not mentioned on the guide. This is also confusing because it doesn't explicitly say to remove useHistory, so it's not entirely clear why it's showing both approaches.

I'm going to move this over to the docs repo so the team can work on clarifying this part of the guide.

from ionic-docs.

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.