You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Whether the package should be installed as a devDependency or dependency depends entirely on how you plan to use it in your package. Typically, you'll want idx as a dependency and babel-plugin-idx as a devDependency. However, you may want idx as a devDependency if — for example — it is only being used by build tools. Likewise, you may want babel-plugin-idx to be a `dependency if — for example — you use the Babel plugin during the runtime of your package.
You need to import idx because for all intents and purposes, it's just another module that exports a function. The Babel plugin is an optional (but highly recommended) performance optimization.
There is no real "syntax" to idx. There are limitations, but the syntax is valid ECMAScript syntax. The babel-plugin-idx that you're probably referring to is, as mentioned above, a performance optimization. As its name implies, it requires Babel to transform your idx call expressions. It can occur either as a build step or at runtime, depending on how you choose to use Babel.
Some info is missing in the README.md.
Do I need to install
idx
asdevDependency
ordependency
?After I write the
idx
optional chaining syntax, do I need to import theidx
function? If, yes, why?Does
idx()
function transform the syntax when using babel or in runtime?Do I need any config in
.babelrc
?The text was updated successfully, but these errors were encountered: