Skip to content

Releases: forge-42/remix-toast

v4.0.0

24 Dec 11:51
37d0ef9

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.4.0...v4.0.0

v3.4.0

25 Nov 12:17
a2af11c

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.3.0...v3.4.0

v3.3.0

22 Sep 07:49
5bab6fa

Choose a tag to compare

What's Changed

  • Stabilized middleware API for RR v7.9+ by @kenn in #48

New Contributors

  • @kenn made their first contribution in #48

Full Changelog: v3.2.0...v3.3.0

v3.2.0

01 Sep 12:13
78b5f7f

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.1.0...v3.2.0

v3.1.0

09 Apr 13:43
42bcbd8

Choose a tag to compare

Self-setting toast notifications

You can now use a setToast utility from middleware to set toasts anywhere and they are automatically added.

Enhanced toast passthrough

Now you can pass in any arbirtrary properties into toasts

What's Changed

Full Changelog: v3.0.0...v3.1.0

v3.0.0 - Middleware support

05 Apr 12:30

Choose a tag to compare

Middleware mode

In order to be able to show toasts anywhere in the app you need to add the following code to your root.tsx file.

import { getToast, unstable_toastMiddleware } from "remix-toast/middleware";

export const loader = async ({ request }: LoaderFunctionArgs) => {
  // Extracts the toast from the request
  const toast = getToast(context); 
  // pass it to the client side
  return { toast }
}

export default function App({ children }: { children: ReactNode }) {
  const { toast } = useLoaderData<typeof loader>();
  
  useEffect(() => {
   if(toast){
    // Call your toast function here
    alert(toast.message);
   }
  }, [toast])

  return (
    ...
  );
}

// Export the middleware to be used in the app
export const unstable_middleware = [unstable_toastMiddleware()];

This change also should fix any sort of race condition issues that were reported in the past

What's Changed

New Contributors

Full Changelog: v2.0.0...v3.0.0

v2.0.0 - React router v7

23 Nov 12:56

Choose a tag to compare

React router v7

Remix toast now supports react-router v7, if you're using remix you can stay on v1.2.2 until you migrate and use this package!

Breaking changes

All the json* utilities have been renamed to data* to align better with react-router v7 convention

Full Changelog: v1.2.2...v2.0.0

v1.2.2

19 Sep 08:10

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.1...v1.2.2

v1.2.1

31 Jul 08:16

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.0...v1.2.1

v1.2.0

18 Feb 13:42
c46f4be

Choose a tag to compare

Description field

Now you can pass in optional description field to all the utilities alongside with the message by passing in an object instead of a string as the second parameter, still works with a string as well

Session configuration

Custom utilities

Now you can create a custom session storage and pass it into createToastUtilsWithCustomSession to create all the utilities used by remix-toast with your custom session. Refer to the README for details.

Global session configuration

Thanks to Raphael there is a new setToastCookieOptions function that allows you to configure your toast session values globally

What's Changed

New Contributors

Full Changelog: v1.1.0...v1.2.0