struggling to get a 'tag input' form element with autocomplete

So part of this may indeed be that I’m not getting the modules to load correctly?

I took a different tack and forked Tom’s Observable React Guide here:

I worked through the process of trying to load in the module as:

r = require.alias({
  react: "react@16/umd/react.production.min.js",
  "react-dom": "react-dom@16/umd/react-dom.production.min.js",
  "react-bootstrap-typeahead": "react-bootstrap-typeahead@3.2.4/lib/index.js"
})

… but failed: I get Typeahead = Error: invalid module with

Typeahead = r('react-bootstrap-typeahead')

I see that both react and react-dom have /umd/ in the path, so maybe I am missing something there?

Also, it is possible to load the module with Observable’s require:

react_bootstrap_typeahead = require('https://bundle.run/react-bootstrap-typeahead@3.2.4')

… but is this a different thing than loading the module as a React Component? Or should everything just play together?

Even as I try to progress by dropping in some code from the example, I get SyntaxError: Unexpected token for a pattern that I see throughout all of the examples.

Can anyone offer some further insights? I really appreciate your time and guidance!


More things for me to get my head around: