Skip to content

[@algolia/ui-components-horizontal-slider-js] horizontalSlider not working with recommend-js in UMD #1

Open
@sarahdayan

Description

@sarahdayan

Description

When using ui-components-horizontal-slider-js with recommend-js and both libraries are loaded in UMD, they both import their own bundled version of Preact. Even if the version is the same, the fact that each function uses a different instance of Preact breaks the app.

Reproduction

Preview →

Steps

  1. Visit the sandbox
  2. See the runtime error

Expected behavior

The app should run normally.

Suggested fix

If recommend-js was providing createElement and Fragment in view and that ui-components-horizontal-slider-js accepted a renderer (like autocomplete-js) we could bind the same instance of Preact, which should work.

Environment

  • OS: macOS Monterey 12.3.1
  • Browser: Firefox 99.0.1
  • Library version: @algolia/ui-components-horizontal-slider-js 1.0.0 / @algolia/recommend-js 1.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions