-
#4865
dd2fdc96
Thanks @Artur-! - fix: Widen range for React types to include React 19 -
#4755
25962bf5
Thanks @kyubisation! - Implement SSR event handling and an optional flagglobalThis.litSsrCallConnectedCallback
to callconnectedCallback
during SSR, if set to true. -
Updated dependencies [
25962bf5
]:- @lit-labs/[email protected]
-
#4575
aa4fc3ef
- The Node build of@lit-labs/ssr-react/enable-lit-ssr.js
now also monkey-patchesreact/jsx-runtime
to include logic for deeply server-rendering Lit components without modifyingjsxImportSource
in tsconfig.The monkey-patching logic also adds a workaround for inconsistent es module interop behavior in tools like webpack which could lead to errors like
TypeError: Cannot set property createElement of [object Module] which has only a getter
.
- #4575
aa4fc3ef
- Use a global flag to detect whether@lit-labs/ssr-react/enable-lit-ssr.js
was used for coordinating props when server rendering components made with@lit/react
.
-
#4364
1ea4720f
- Fix rendering of nested custom elements so that child custom elements will properly have thedefer-hydration
attribute from SSR, ensuring correct hydration order from parent to child. -
Updated dependencies [
ef2976b9
,011b762d
]:- @lit-labs/[email protected]
- #4311
cabe72a8
- Removedlit
package from dependency. It is now listed as a dev dependency since it is only used for testing.
-
Updated dependencies:
-
Updated dependencies [
6b515e43
,0f6878dc
,2a01471a
,77e9b48e
,2eba6997
,d27a77ec
,6470807f
,09949234
]:- @lit-labs/[email protected]
- [email protected]
-
#3885
7932f7dd
-@lit-labs/ssr-react
and@lit-labs/react
now coordinate prop handling during server rendering and hydration.- [Breaking]
@lit-labs/ssr-react
will callsetAttribute()
with all props provided during server rendering unless they are provided in_$litProps$
object made by@lit-labs/react
. Previously, it would callsetProperty()
for props that were found in the element's prototype, andsetAttribute()
for those that weren't. If you wish to server render custom elements that take properties that can not be set as attributes (i.e. not serializeable or have different name as attribute/property), you must use@lit-labs/react
to create a React wrapper component. @lit-labs/react
now has a Node build and export condition to do special prop handling during server rendering. It detects the presence ofReact.createElement
monkey patch by@lit-labs/ssr-react
and provides props to be set as properties to thecreateElement()
call.@lit-labs/ssr-react
will add thedefer-hydration
attribute to custom elements that had properties set so that@lit-labs/react
wrapped elements have a chance to set properties on the element before Lit element hydration is triggered.@lit-labs/react
wrapped components will suppress hydration warnings raised by React due to server rendered attributes.
- [Breaking]
-
Updated dependencies [
dfd747cf
,23c404fd
,1db01376
,c3e473b4
,92cedaa2
,23326c6b
,f06f7972
]:- [email protected]
- @lit-labs/[email protected]
- @lit-labs/[email protected]
-
#3720
575fb578
- Use hydration modules from@lit-labs/ssr-client
-
Updated dependencies [
575fb578
]:- @lit-labs/[email protected]
-
#3605
b731bb5e
- Initial release of@lit-labs/ssr-react
package.This package contains tools to deeply server render Lit components being used in React projects.
- Updated dependencies [
f2eb9796
,ca74ff6e
,b95c86e5
,e00f6f52
,a5a584d5
,61ec3dab
,88a40177
]:- @lit-labs/[email protected]
- [email protected]