Closed
Description
I have App.html and a child component - Login.html.
When the user submit the login form the Login component calls the server endpoint and on success I change user.loggedIn
to true and add a user key to the localStorage. The problem is the App.html should be aware of it so it can change it's content and remove some UI elements (link to login for example).
- Is this the right approach?
- If SSR and progressive enhancement #1 is 'yes', how do I communicate this with the parent component?
- Since I use this router, the new keyword is not being used. How to access the component API from the parent (App.html)?
Here is my example repo:
https://github.com/oren/svelte-router-example/blob/c638c8786084a327bffdcac99da13b55695667cb/src/components/Login.html
Thanks!
Metadata
Metadata
Assignees
Labels
No labels