I want to redirect from one page to other and pass props along with it. But i dont want these params in url.
Method :
saveForLater(){
if (typeof window !== "undefined") {
window.location.href = "./DataDisplay/";
}
};
I checked with urlparams we can set {"id":content} in url. But i do not wish to pass data in url.
I can not use Link / Route in the method . Is there any way to do it/any library to checkout? Pls suggest
CODE SAMPLE:
import React, { Component } from "react";
class DATAFETCH extends Component {
constructor(props) {
super(props);
this.state = {
Attachments: [],
validated: false,
isDoctor:false,
}
saveForLater(){
if (typeof window !== "undefined") {
window.location.href = "./DataDisplay/";
}
};
render() {
return (
/////// Various Fields
<Button
onClick={() => props.submit()}
>
)}