hono icon indicating copy to clipboard operation
hono copied to clipboard

Session flash?

Open typicode opened this issue 11 months ago • 6 comments

What is the feature you are proposing?

I don't have a strong opinion on this and I'm fine with the way Hono currently works.

However, I'm wondering if something for making flash messages easier would make sense to be in the core? For example, to show a message after a successful POST request and a redirect.

Here are three options that I see:

  1. Create a setFlash and getFlash
  2. Make deleteCookie return the deleted value
  3. No changes and keep Hono core small

What do you think?

typicode avatar Mar 07 '24 00:03 typicode

Hi @typicode !

I think that is a great idea. I also wanted the feature like session flashing, as you said.

I'd like to hear others' opinions.

@usualoma @watany-dev @Code-Hex @sor4chi @nakasyou and others, how do you feel?

yusukebe avatar Mar 09 '24 01:03 yusukebe

My personal preference is either 2 or 3!

Code-Hex avatar Mar 10 '24 02:03 Code-Hex

I prefer 2 because it is the least destructive, intuitive, and extensible.

sor4chi avatar Mar 10 '24 02:03 sor4chi

I like 2 because it is expandable and smart.

nakasyou avatar Mar 10 '24 03:03 nakasyou

Hi all, I commented once because the discussion had stopped. I think 2 would be a quick and easy category to implement.

If it's okay with you if we continue to submit PR, we'll get to work on it.

sor4chi avatar Apr 15 '24 18:04 sor4chi

Hi @sor4chi

If it's okay with you if we continue to submit PR, we'll get to work on it.

Will you do it? Please!

yusukebe avatar Apr 15 '24 18:04 yusukebe

This has been fixed by #2512 . Thanks!

yusukebe avatar Jun 06 '24 08:06 yusukebe