Extension manager with Svelte, Typescript, design system

Solution retrospective
- When I tried to set the src of an
<img>
element in a.svelte
component markup, Vite correctly served the image when running in dev but did not bundle them when building for prod. I discovered that I had to import the assets in the<script>
of the component. - It was hard to tell which of the provided colors in the style guide belonged to which element.
I would like to know what the best way to manage data flow in Svelte (and similar frameworks) is.
As I currently understand things, the data flows down to child components, but then an event happens on the level of one of the leaf elements. My question is, how do I effectively pass this change in state up the component tree? And how do I then communicate this change to a server and have the server update the client state?
Also in this app I used an {#await} block to wait for an async function that mutated a global $state because I needed to modify the state client-side after it had been loaded. Is this solution good? Or is there a better way?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Drumstickz64's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord