Skip to content

Commit

Permalink
Add migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
dpikt committed Sep 28, 2020
1 parent 1d5f081 commit 82c445d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Documentation and usage info can be found in [docs.md](docs.md).
- [v2.0.0](migration-guides/v2.0.0.md)
- [v3.0.0](migration-guides/v3.0.0.md)
- [v4.0.0](migration-guides/v4.0.0.md)
- [v5.0.0](migration-guides/v5.0.0.md)

## Contribution

Expand Down
17 changes: 17 additions & 0 deletions migration-guides/v5.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# v5.0.0 Migration Guide

The only breaking change in this version is that `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`.

You should update any instances of `FlashMessage` like so:

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

```jsx

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

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

```

0 comments on commit 82c445d

Please sign in to comment.