@blhylton/flash-messages

A simple utility for managing flash messages in a javascript application

Usage no npm install needed!

<script type="module">
  import blhyltonFlashMessages from 'https://cdn.skypack.dev/@blhylton/flash-messages';
</script>

README

Flash Messages

A simple library for managing flash messages in your Javascript application.

Background

This library is based on the concept of a flash message from the server-side world, repurposed for use exclusively in front end applications.

...meant to be used exactly once: [flash messages] vanish from the session automatically as soon as you retrieve them. This feature makes "flash" messages particularly great for storing user notifications.

-- Symfony Documentation(https://symfony.com/doc/current/controller.html#flash-messages)

Obviously, there's no session on the frontend in this context, but the idea remains the same: Create a message with short-lived permanence.

Get Started

TODO

Usage

TODO