Explore tweets tagged as #SharedModule
You might be using a SharedModule to share components between different modules of your application 🤔 In most cases it will cause issues with tree shaking and bundle size of your modules 🍃 Let’s explore why, and what might be the possible alternatives 👇
10
48
205
You have a simple app, with landing, contact, and a blog page. All of them render the button component. Since you need to share the button between multiple pages, you decide to create a SharedModule with this component. SharedModule is then imported in all 3 pages.
1
1
11
In the context of our example app, we’re gonna refactor the SharedModule into three Single Component Angular Modules. One for button, input, and table.
2
0
7
There is an issue though. The landing page never uses the input component. But because it is importing the SharedModule, it will import the input component as well. And because of that, the bundle size of the landing page is larger than it needs to be 😢
3
0
11
Next, you need to render an input component to support adding comments on the blog page. You also need to render a message input on your contact page. Since this input is shared, you again put it in the SharedModule. How DRY is that? 💪
1
1
7
BuildAssist1.1.0、主にWebGLの項目を追加、AssetBundleもちょっとオプション追加、SharedModuleはv1.0.2が必要となります。
0
0
1
Next, I realized not all `NgModule`-s were removed. Biggest culprit? The dreaded "SharedModule". Please, if you have such monstrosities in your app, consider removing them before the schematic migration, you will save lots of time and energy not detangling this complex web
2
1
14
Looks like SharedModule is still quite popular in most Angular apps 🙈 Be safe, use SCAMs (or standalone). #Angular
3
4
31
@TaylorAckley @samjulien @angular At quick glance, you'll see that "Oh, both Foo and Bar are completely separated from SharedModule. Such a good thing". But, when you load Foo, Angular will also load SharedModule because Foo is using SharedA. you're also loading SharedB which Foo never needs. That's a waste
1
0
0
Appears in the NgModule.imports of ViewClientModule, but itself has errors 664 export class SharedModule { } https://t.co/ggMZyeeZc7
#angularmaterial #ngmodules #angular #angular13
0
0
0
Exploring Angular Modules, from feature to share, here's a breakdown of the essentials. #WebskittersAcademy #AngularModules #FeatureModule #RoutingModule #ServiceModule #WidgetModule #SharedModule #AngularDevelopment #CodingLife #TechExploration
0
0
0
Spock SLAF - A Shared Library Application Firewall "SLAF" https://t.co/h0bQpT8Mwh
#CLanguageProgramming #HookingLibrary #SharedLibrary #SharedModule
0
2
3
In my opinion, SharedModule is a big anti-pattern in Angular which should be avoided.
4
2
9
KMPのSharedModuleを導入して、決して両OSネイティブ開発で十分なリソースとは言えない中でも安全性を保って実装ができるしなんなら分担のしやすさも向上したんだけど、
1
1
4
@walkingriver SharedModule is all you need 😅
0
0
1
Angular使ったデザインテンプレートをいくつか購入したけど、全てがSharedModuleを作っててすごく違和感覚えてた。(Angular がコンパクト化を目指す中で、Sharedはゴリッとimportされるから)
1
0
3
Okay. To explain what I did in more detail. If you ever want to achieve something like this: + package1 |--- someModule +package2 |--- someOtherModule +util |--- sharedModule Where the two modules in package1 and package2 are able to access sharedModule you have to...
1
0
0