Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add deprecation JSDoc for render()'s replaceNode #3700

Merged
merged 3 commits into from Aug 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/index.d.ts
Expand Up @@ -275,6 +275,11 @@ export namespace h {
// Preact render
// -----------------------------------

export function render(
vnode: ComponentChild,
parent: Element | Document | ShadowRoot | DocumentFragment,
): void;
/** @deprecated Will be removed in v11. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure of what we want to suggest in the message. Maybe link to https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c until better docs are written?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be good, yep.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added that in.

/**
 * @deprecated Will be removed in v11.
 *
 * Replacement Preact 10+ implementation can be found here: https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c
 */

export function render(
vnode: ComponentChild,
parent: Element | Document | ShadowRoot | DocumentFragment,
Expand Down