-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple suspense renderer 2024 (#333)
* Simple Suspense renderer * update simple suspense rendere * add a possible promise string as the return value * Update test/compat/async.test.js * Create pink-gifts-kneel.md * non breaking * Update async.test.js * fixing nested Suspense boundaries (#334) * fixing multiple suspended child components (#335) --------- Co-authored-by: Chris Sauve <chrismsauve@gmail.com> Co-authored-by: David Dios <david.dios@loveholidays.com>
- Loading branch information
1 parent
22cb846
commit 6acc97a
Showing
8 changed files
with
363 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"preact-render-to-string": minor | ||
--- | ||
|
||
Allow prepass like behavior where a Promise | ||
will be awaited and then continued, this is done with | ||
the new `renderToStringAsync` export |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
import { VNode } from 'preact'; | ||
|
||
export default function renderToString<P = {}>(vnode: VNode<P>, context?: any): string; | ||
export default function renderToString<P = {}>( | ||
vnode: VNode<P>, | ||
context?: any | ||
): string; | ||
|
||
export function render<P = {}>(vnode: VNode<P>, context?: any): string; | ||
export function renderToString<P = {}>(vnode: VNode<P>, context?: any): string; | ||
export function renderToStaticMarkup<P = {}>(vnode: VNode<P>, context?: any): string; | ||
export function renderToStringAsync<P = {}>( | ||
vnode: VNode<P>, | ||
context?: any | ||
): string | Promise<string>; | ||
export function renderToStaticMarkup<P = {}>( | ||
vnode: VNode<P>, | ||
context?: any | ||
): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.