Comments (2)
A little further clarification to how this repro is set up, and which files are relevant.
Conditional Svelte Component
Typical svelte component that accepts props.
# Example
/src/routes/display-apple.svelte
/src/routes/display-orange.svelte
Switch Component - with {#if} block
A component that accepts a discriminated union, and renders a component for each case using the {#if}
block.
# Example
/src/routes/conditional-with-if.svelte
Switch Component - with {#if} block
A component that accepts a discriminated union, and renders a component for each case using a component map and <svelte:component />
element.
# Example
/src/routes/conditional-with-map.svelte
Page Component
Loops over data, using the switch component to conditionally render the correct component.
# Example
/src/routes/+page.svelte
from svelte.
Likely same underlying reason as for #12403
from svelte.
Related Issues (20)
- Preprocess Svelte modules (or deprecate preprocessors?) HOT 6
- enhancement(custom element): make `tag` optional in customElement component options
- Svelte5: Calling $derived multiple times HOT 8
- Svelte 5 not reacting to onclick HOT 1
- Error when appending hydration error to head. HOT 6
- Spreadable actions (aka. `use:` directives) HOT 1
- [Svelte 4] bind:this is undefined when running action of child until all children initialize
- Svelte 4 and 5 adds spaces between html elements when mounting components through JavaScript HOT 10
- Custom element props not changeable after assigned value inside component HOT 2
- Svelte automatically binding this to function exports of components HOT 3
- `bind:this` weird behavior HOT 5
- Expose reactivity primitives to users HOT 5
- ReferenceError: $$props is not defined when calling $host()
- CustomElement $effect caused due to props read HOT 7
- `https://svelte.dev` unresponsive, keeps timing out HOT 1
- Web component styles missing when mounted more than once HOT 6
- Consider replacing `export const` and `export function` with a rune HOT 5
- a11y Invalid autocomplete value warning HOT 3
- Feature: Implement {#with } logic block from Ractive.js HOT 2
- Svelte v5 + Sveltekit: Index.d.ts is not generated when exporting components as object properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.