New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lit-labs/ssr-react

Package Overview
Dependencies
Maintainers
11
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lit-labs/ssr-react - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1-pre.0

4

lib/node/render-custom-element.js

@@ -44,3 +44,3 @@ /**

}
// This prop is created by `@lit-labs/react` createComponent containing
// This prop is created by `@lit/react` createComponent containing
// items to be set as properties

@@ -51,3 +51,3 @@ if (k === '_$litProps$') {

}
// Defer hydration so `@lit-labs/react` createComponent can set
// Defer hydration so `@lit/react` createComponent can set
// properties on element before hydration

@@ -54,0 +54,0 @@ elementAttributes['defer-hydration'] = '';

@@ -41,2 +41,5 @@ /**

}
// The types here are complex, but the important thing is just that we're
// passing through the arguments to the original createElement function.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return originalCreateElement(type, props, ...children);

@@ -43,0 +46,0 @@ };

{
"name": "@lit-labs/ssr-react",
"version": "0.2.0",
"version": "0.2.1-pre.0",
"publishConfig": {

@@ -50,5 +50,5 @@ "access": "public"

"dependencies": {
"@lit-labs/ssr": "^3.1.0",
"@lit-labs/ssr-client": "^1.1.0",
"lit": "^2.7.0"
"@lit-labs/ssr": "^3.1.8-pre.0",
"@lit-labs/ssr-client": "^1.1.4-pre.0",
"lit": "^3.0.0-pre.1"
},

@@ -104,3 +104,3 @@ "peerDependencies": {

"devDependencies": {
"@lit-labs/react": "^1.2.0",
"@lit/react": "1.0.0-pre.0",
"@types/react": "^18.0.27",

@@ -107,0 +107,0 @@ "@types/react-dom": "^18.0.10",

@@ -37,3 +37,3 @@ # @lit-labs/ssr-react

This approach has the advantage of being compatible with Lit components wrapped as React components using the `@lit-labs/react` package, which calls `React.createElement()` directly. It'll also work for any external React components pre-compiled with the classic JSX runtime transform.
This approach has the advantage of being compatible with Lit components wrapped as React components using the `@lit/react` package, which calls `React.createElement()` directly. It'll also work for any external React components pre-compiled with the classic JSX runtime transform.

@@ -72,3 +72,3 @@ #### Specifying an alternative `createElement()` function

This method will not work for any pre-compiled JSX expressions or direct calls to `React.createElement()`, including those in the usage of the `@lit-labs/react` package's `createComponent()`. Consider combining this with the [monkey patching](#monkey-patching-reactcreateelement-recommended) approach to handle such scenarios.
This method will not work for any pre-compiled JSX expressions or direct calls to `React.createElement()`, including those in the usage of the `@lit/react` package's `createComponent()`. Consider combining this with the [monkey patching](#monkey-patching-reactcreateelement-recommended) approach to handle such scenarios.

@@ -96,3 +96,3 @@ In the unlikely event that you wish to use React components that are pre-compiled with the automatic transform, i.e. those already written using `jsx` or `jsxs` functions, that also contain Lit components you wish to SSR, a build tool will need to be used to replace the import source of those functions to be from `@lit-labs/ssr-react`.

For Lit elements wrapped with `@lit-labs/react`'s `createComponent()`, properties present on the element will be set as **properties** instead of **attributes** for server rendering. Client side hydration will also be deferred such that it'll wait for element properties to be set before the first update happens. Note: this is only made available by the [monkey patching](#monkey-patching-reactcreateelement-recommended) approach.
For Lit elements wrapped with `@lit/react`'s `createComponent()`, properties present on the element will be set as **properties** instead of **attributes** for server rendering. Client side hydration will also be deferred such that it'll wait for element properties to be set before the first update happens. Note: this is only made available by the [monkey patching](#monkey-patching-reactcreateelement-recommended) approach.

@@ -99,0 +99,0 @@ ## Enabling Declarative Shadow DOM

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc