Comments (2)
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](https://private-user-images.githubusercontent.com/6884752/315241815-4d5f75ca-85cd-479e-90f3-6e0e9d009c30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY1NDQzNTUsIm5iZiI6MTcxNjU0NDA1NSwicGF0aCI6Ii82ODg0NzUyLzMxNTI0MTgxNS00ZDVmNzVjYS04NWNkLTQ3OWUtOTBmMy02ZTBlOWQwMDljMzAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUyNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MjRUMDk0NzM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDNjYjAzMDkxMzRlNzNlNDliYzM4ZTE1YTA4ZjRjYTU5MDgzZWFlYzM4YzY4ZWMzMjQxZDM3OGI2ZDZmYmZiMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.C0JyLlmEripwyTggkGnajf53xgw0REvRIe6Z3ClhuRs)
from ionic-docs.
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)
- bug: <IonToast> class property has Typescipt issue
- displayed incorrect HOT 2
- content: radio example custom css should be round HOT 1
- bug: Controller Toasts HOT 2
- bug: header and content top of the page error HOT 1
- content: Maskito vue directive
- content: Example shows uncommon IonRouterOutlet usage
- ion-segment, ionChange should explain it is not fired when value changed programmatically HOT 1
- content: Missing Ionic 8 release notes and migration guide HOT 1
- bug: ion-item + ion-checkbox on 'start' slot not respect width on v8 (v7 was ok) HOT 1
- bug: IonItemOptions stays open after ionIonSwipe is excecuted
- content: HOT 2
- bug: samples are not displayed in the ionic docs due to SSL cert issue HOT 2
- content: Inaccurate CORS origin name
- content: Missing clean-up function in useEffect to remove event listener.
- feat: Chinese localization
- content: IonPicker and v-model examples in general
- Vanilla Javascript Reload (Astro View Transitions)
- bug: Radio component is not showing preview for Object Value References
- bug: CSS Custom Properties present 2x in a tables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-docs.