React Goodbye Versions Save

A save reminder component for react router

v0.4.0

5 years ago

Thanks to this PR: #14.

Adding conditional prompt function to allow rendering Goodbye on some conditions

Please check the README for the instructions.

v0.3.5

5 years ago

Thanks to #11 for this minor fix.

v0.3.4

5 years ago

Thanks for the discussion from #8, I made a improvement by #9

  1. Refactor GoodBye Provider with bound object literal that avoids the new React 16.3 context caveats which may leads to unintentional re-render
  2. Rename pass function to handlePass. It allows you to do additional actions (of course, you can wrap the handleOk or handleCancel with your own higher-order function!).

v0.2.0

6 years ago
  • alertBeforeUnload

    • When this props is true, the component will also add onbeforeunload event to the window object that detects the page to popup an alert before you leave without saving data changes.
    • This event fires when user close or reload the current page. The reason is that there is no way to detect close/reload actions except this event.
  • alertMessage

    • Custom browser popup message.
    • Note that the text message is only for IE users due to browser limitation.

v0.1.10

6 years ago
  1. Add test cases for withGoodBye and Provider
  2. Do not log error message in production when error occurs