useBeforeUnload story and docs improvement

This commit is contained in:
Ward Oosterlijnck 2019-04-11 18:08:15 +10:00
parent 36206051a5
commit cc148366ba
2 changed files with 2 additions and 2 deletions

View File

@ -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>
);

View File

@ -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>
);