Skip to content

Typescript support, named import and lib import. #19

Description

@danyhiol

I've also been looking for some dynamic way to load components in my app and I found to this. I do like the idea behind but have some question.

  1. There is no typescript. On a huge project, it's difficult to keep track of each component's props. So It would be niche if the end result was a component with props-typing. The same goes for òpts`.
  2. @loadable/component offers things like this: const Moment = loadable.lib(() => import('moment')) to be used like this:
<Moment fallback={date.toLocaleDateString()}>
    {({ default: moment }) => moment(date).fromNow()}
</Moment>

I guess this would also be possible using this module.
3. What about NamedExports? Things like import { A, B, C } from 'module'? From the doc, this would require 3 different imports for each named-import.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions