Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 681 Bytes

v5.0.0.md

File metadata and controls

24 lines (17 loc) · 681 Bytes

v5.0.0 Migration Guide

FlashMessage now expects separate children and isError props, rather than a single message prop. This allows the component to be used without needing to use redux-flash. It also no longer wraps content in a <p> tag by default.

You should update any instances of FlashMessage accordingly.

(Note: this change is not necessary if you are using FlashMessageContainer instead of FlashMessage directly.)

// Before, where "message" was a redux-flash message object:
<FlashMessage message={message} />

// After:
<FlashMessage
  isError={message.isError}
  {...message.props}
>
  <p>
    {message.message}
  </p>
</FlashMessage>