Comments (2)
Add this to render.unit.ts
it.only('should render nested component when it is projected by parent', async () => {
const Layout = component$(
() => {
return $(() => (
<div>
<Slot />
</div>
));
},
{ tagName: 'layout' }
);
const Content = component$(
() => {
return $(() => (
<span>
<Slot />
</span>
));
},
{ tagName: `content` }
);
await render(
fixture.host,
<Layout>
<Content>projection</Content>
</Layout>
);
console.log(prettyHtml(fixture.host));
expectRendered(
<layout>
<template />
<div>
<q:slot>
<content>
<template />
<span>
<q:slot>projection</q:slot>
</span>
</content>
</q:slot>
</div>
</layout>
);
});
the issue is that if you have two components the slot projection ends up in the inert <template>
rather than inside of inner component. A quick look I suspect that cursorForComponent
is not being called for the inner component. The purpose of the cursor is to abstract away the slot projection, and somehow in this case it is failing.
from qwik.
Fixed 7fadd18
from qwik.
Related Issues (20)
- [📖] docs layout issue with changed browser-wide default font size HOT 1
- [🐞] error when using `stack.raw()` on a project with panda css integration HOT 1
- [🐞] useStyles$/useStylesScoped$ duplicates CSS in bundle
- [🐞] pnpm run build hang when i use ioredis and bullmq HOT 3
- [✨] add reset button to tutorial
- [🐞] If Signal is used by useTask$ it doesn't re-render should it work that way? HOT 6
- [🐞] Warned when serializing `JSXNode`. HOT 4
- [🐞] RouteAction submitted programmatically not working in a vercel edge environment HOT 2
- [🐞] Production Build with Qwik Framework - Uncaught TypeError HOT 5
- [🐞] Error: Actions can not be invoked within the server during SSR. HOT 2
- [🐞] - Blank project not running - Sharp Error HOT 3
- Qwik showcase page has zooms in after scrolling to certain part HOT 4
- [🐞] Custom 404 is generated, but not used automatically HOT 1
- [🐞] Docker devcontainer build fails
- Qwik won't build If I try using Broadcast Channel HOT 9
- [🐞] Dynamic require of "tty" is not supported when adding builder.io integration
- How should I combine useAuthSession with a simple axios wrapper?
- [✨] How to load dynamic configuration and settings for both server-side and client-side? HOT 1
- [🐞] SSG works even without intending so HOT 9
- [🐞] Can't build project via `bun run --bun` HOT 5
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 qwik.