Skip to content
This repository was archived by the owner on Mar 26, 2021. It is now read-only.
This repository was archived by the owner on Mar 26, 2021. It is now read-only.

Add option to set current React instance. #3

@rmorshea

Description

@rmorshea

This line makes it hard to work with IDOM client-side because it's bound to the React instance that was built into the client. However we could work around that by doing the following instead I think:

let currentCreateElement = react.createElement;
let html = htm.bind(currentCreateElement);

function bindElementConstructor(createElement) {
  if (createElement !== currentCreateElement) {
    html = htm.bind(createElement)
  }
}

This way downstream clients can set what React instance is being used

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions