mirror of
https://github.com/streamich/react-use.git
synced 2025-12-08 18:02:14 +00:00
useBeforeUnload story and docs improvement
This commit is contained in:
parent
36206051a5
commit
cc148366ba
@ -14,7 +14,7 @@ const Demo = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
{dirty && 'Try to reload or close tab'}
|
||||
{dirty && <p>Try to reload or close tab</p>}
|
||||
<button onClick={() => toggleDirty()}>{dirty ? 'Disable' : 'Enable'}</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -9,7 +9,7 @@ const Demo = () => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
{dirty && 'Try to reload or close tab'}
|
||||
{dirty && <p>Try to reload or close tab</p>}
|
||||
<button onClick={() => toggleDirty()}>{dirty ? 'Disable' : 'Enable'}</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user