DEV Community

Discussion on: Simplifying styling in PWA Studio

Collapse
 
dndsafran profile image
Dnd-Safran • Edited

Hi ! First great article, very inspiring ;p

@jissereitsma you can replace the component only using webpack hooks (upon import request, you switch the file ;p)

@chrisbrabender Is there's a particular reason why you use double declaration :

const eSModule = targetables.reactComponent(jsComponent);
const module = targetables.module(jsComponent);
Enter fullscreen mode Exit fullscreen mode

Since TargetableReactComponent extends TargetablesModule, you just need the first one right ? And I think, it will return the same instance anyway, so "module = eSModule"