Alias in CoreComponents

I’m trying to use PetalComponents. Both PetalComponents and CoreComponents import their function components into all LiveViews, which breaks compilation.

Wouldn’t it have been better for CoreComponents to be aliased in rather than imported to avoid naming conflicts? This automatic import creates a global namespace for CC function components and personally I prefer to avoid global namespaces.

Same goes for PetalComponents. You should be able to alias these function components as well and currently this isn’t very easy. There is an open issue in the Petal components repo regarding this.

Maybe it’s a moot point now, though. If you removed all the global imports of CoreComponents, it would be a breaking change.

1 Like