block-browser-back
v1.0.1
Published
This in a NPM to block browser back button
Downloads
2
Readme
block-browser-back
A simple React hook to block users from navigating back using the browser's back button.
Installation
Dillinger requires Node.js v10+ to run.
Install the dependencies and devDependencies and start the server.
npm i block-browser-back
How to use
import React from "react";
import { useBlockBrowserBackButton } from "block-browser-back";
const YourComponent = () => {
useBlockBrowserBackButton();
return (
<div>
{/* Your component JSX */}
</div>
);
};
export default YourComponent;
License
MIT