I am working in react.js. I have button with onClick event. After click -> reload page and after reload want show some component bar on page.
Problem is that after reload that component doesn’t show.
How can I achieve this behavior ?
const checkout = () => {
setIsModalOpen(!isModalOpen)
window.location.reload()
toast.success("Thank you for your purchase!", {
position: "top-center",
autoClose: 4000,
theme: "dark",
})
}