Skip to content

Having trouble getting React example working #750

Answered by Haroenv
lukebennett88 asked this question in Q&A
Discussion options

You must be logged in to vote

It's a small thing you missed, but render is also required to be passed: https://codesandbox.io/s/nostalgic-lake-brpbe?file=/components/autocomplete.tsx

    const search = autocomplete({
      container: containerRef.current,
      placeholder: "Search for products",
      renderer: {
        createElement: React.createElement,
        Fragment: React.Fragment
      },
      // this here:
      render({ children }, root) {
        render(children, root);
      },

I opened an issue to add an error in this case: #751

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lukebennett88
Comment options

Answer selected by lukebennett88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants