Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

props.history is undefined #70

Closed
simkimsia opened this issue Aug 28, 2018 · 8 comments
Closed

props.history is undefined #70

simkimsia opened this issue Aug 28, 2018 · 8 comments

Comments

@simkimsia
Copy link

@simkimsia simkimsia commented Aug 28, 2018

My team is trying to integrate this theme into a Django project.

Whilst doing so, (version 1.3.0) we found that props.history is undefined.

To fix it, my team added the withRoutercomponent, here is documentation about it https://reacttraining.com/react-router/web/api/withRouter

E.g.
image

image

image

@EINazare
Copy link
Collaborator

@EINazare EINazare commented Aug 28, 2018

Hello @simkimsia ,

Thank you for your interest in using our product and thank you for pointing out this issue.
We are going to add this in our docs.

Best,
Manu

@sraiah
Copy link

@sraiah sraiah commented Aug 28, 2018

hello @simkimsia ,
install "react-router-dom": "4.2.2"
import { withRouter } from 'react-router'

this.props.history.push('/details/allocationsdata');

export default withRouter (withStyles(tableStyle)(AllocationList));
i think it may helps u

@simkimsia
Copy link
Author

@simkimsia simkimsia commented Aug 29, 2018

@sraiah I don't quite understand your code snippet. This is in reference to?

@simkimsia
Copy link
Author

@simkimsia simkimsia commented Aug 29, 2018

@EINazare I am a paid customer of your theme. You're welcome.

Also, I am using this theme for django project. Once I figured out roughly how to integrate this, would your team be interested in me writing up a guide for integration?

@EINazare
Copy link
Collaborator

@EINazare EINazare commented Aug 29, 2018

Hello @simkimsia ,

I've spoke with the board and they would really be interested in your proposal, of making a guide for integrating the product with django.
We've discussed with the board and we would put this guide in our live docs for the product, maybe on github as a separate issue (Integrating Django with material-dashboard-pro-react), and maybe we would add it on our blog as well, but it depends if you are ok with these.
Anyway, if you want to discuss more about this, and do not want to discuss it here, my email is manu@creative-tim.com.

Best,
Manu

@simkimsia
Copy link
Author

@simkimsia simkimsia commented Sep 7, 2018

@EINazare thank you for your feedback. I am glad to hear that your team thinks there's value in my proposal.

Currently, I am not finished with the integration. Once I am done with the integration, I can discuss further with you about the guide. Is that okay?

@EINazare
Copy link
Collaborator

@EINazare EINazare commented Sep 10, 2018

Hello again @simkimsia ,

That is ok with us.

Best,
Manu

@EINazare EINazare closed this Oct 5, 2018
@Lawrencehudson23
Copy link

@Lawrencehudson23 Lawrencehudson23 commented Nov 14, 2020

my solution:
import {useHistory} from "react-router-dom"
let history=useHistory()
history.push("/next-page")

let me know if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants