From the course: Full-Stack Web Applications with Rust and Leptos
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Effects and context
From the course: Full-Stack Web Applications with Rust and Leptos
Effects and context
- [Instructor] At this point, we're pretty much done with the core functionality of our blogging app. There's one feature that can improve our user experience pretty substantially, and that is toast messages. We can see this in the final version of the blogging app. When we submit a post, we see a toast message that says, Post submitted, that disappears after a few seconds. Right now, when we create or update a blog post, the blog post actually gets submitted, but we don't really get much indication of that. You can, of course, infer that the operation was successful just based on the fact that you can see the new post on the previous page, but we can do a lot better than that. A more ideal behavior is that, upon creating the post, the user gets redirected to a read-only view of their blog post as you see here, and they also get a visual toast notification indicating that the post was successfully created. In this lesson, we'll look at how to create this toast component that we just…