Skip to content

Commit

Permalink
use renderToStringAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
mechairoi committed Jun 14, 2024
1 parent 0ca1e14 commit 3bb518a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/qwik-solid/src/solid/server-render.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type QRL, type Signal, Slot, SSRRaw, SSRStream } from '@builder.io/qwik';
import { getHostProps, mainExactProps, getSolidProps } from './slot';
import { renderToString } from 'solid-js/web';
import { renderToStringAsync } from 'solid-js/web';
import { isServer } from '@builder.io/qwik/build';

export async function renderFromServer(
Expand All @@ -17,7 +17,7 @@ export async function renderFromServer(

const newProps = getSolidProps(props);
Object.assign(hydrationProps, newProps);
const html = renderToString(() => {
const html = await renderToStringAsync(() => {
return mainExactProps(undefined, scopeId, Cmp, newProps);
});
const index = html.indexOf('<!--SLOT-->');
Expand Down

0 comments on commit 3bb518a

Please sign in to comment.