Skip to content

Latest commit

 

History

History
109 lines (62 loc) · 7.69 KB

CHANGELOG.md

File metadata and controls

109 lines (62 loc) · 7.69 KB

@lit-labs/ssr-react

0.3.1

Patch Changes

0.3.0

Minor Changes

  • #4575 aa4fc3ef - The Node build of @lit-labs/ssr-react/enable-lit-ssr.js now also monkey-patches react/jsx-runtime to include logic for deeply server-rendering Lit components without modifying jsxImportSource 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.

Patch Changes

  • #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.

0.2.3

Patch Changes

  • #4364 1ea4720f - Fix rendering of nested custom elements so that child custom elements will properly have the defer-hydration attribute from SSR, ensuring correct hydration order from parent to child.

  • Updated dependencies [ef2976b9, 011b762d]:

0.2.2

Patch Changes

  • #4311 cabe72a8 - Removed lit package from dependency. It is now listed as a dev dependency since it is only used for testing.

0.2.1

Patch Changes

0.2.1-pre.0

Patch Changes

0.2.0

Minor Changes

  • #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 call setAttribute() with all props provided during server rendering unless they are provided in _$litProps$ object made by @lit-labs/react. Previously, it would call setProperty() for props that were found in the element's prototype, and setAttribute() 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 of React.createElement monkey patch by @lit-labs/ssr-react and provides props to be set as properties to the createElement() call.
    • @lit-labs/ssr-react will add the defer-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.

0.1.2-pre.0

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • #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.

Patch Changes