Skip to main content

Toast

A simplistic Toasts component, that handles toasts via React Context. The rendering of the toasts is handled via portals.

Installation

$ yarn add @rexlabs/toast

Usage

import {
InfoToast,
WarningToast,
ErrorToast,
SuccessToast,
useToast,
} from '@rexlabs/toast';

Breaking changes

v5.x

  • removed redux option, toasts are only handled through React Context now (we might need to look into options to trigger toasts from outside of React components, I could not find use cases for that though)
  • might have changed the toast object structure a bit
  • right now we only provide a hook, we might want/need to add a HOC for older class based components

Copyright © 2020 Rex Software All Rights Reserved.