🏆 Top 3 Reasons To Use a Centralized Store

  Рет қаралды 1,732

Angular University

Angular University

4 ай бұрын

#Shorts 🏆 Top 3 Reasons To Use a Centralized Store
✅ Improve the UX of customer facing apps, no loading indicators
✅ limit API requests on pay-per request backends
✅ complex UI with multiple views of the same data on the same screen
More details:
🔗 • Angular Mistakes #6: 🛑...

Пікірлер: 8
@AngularUniversity
@AngularUniversity 4 ай бұрын
For a more detailed video, check out: 🔗 kzfaq.info/get/bejne/gt9nldNp0JbMenU.html
@bouvah5499
@bouvah5499 4 ай бұрын
When we have backend pagination sorting and filtering is it good to use state management
@AngularUniversity
@AngularUniversity 4 ай бұрын
For that, you can manage the state locally in your component too with a local stateful service that is tied to the providers of the component. You don't have to use a centralized store for that, it creates a whole category of issues where the state needs to be cleaned up once you navigate away. It's much better to have the state cleaned up automatically when the component that loads the paginated data gets destroyed.
@phuoctoanchauhuynh8557
@phuoctoanchauhuynh8557 4 ай бұрын
Hello Vasco, can I ask you a question please? I have created a custom pipe in Angular. The main concept is that I'm getting data fetch from backend in the service, then I use that list in transform() function but I have tried to put api call in the constructor of the pipe but it seem still be called after the transform function so the list is null. How can I fix it?
@AngularUniversity
@AngularUniversity 4 ай бұрын
Pipes are designed mostly for synchronous transformation of data in the template, like converting a string to a date. If you want to transform the data coming from the backend, you can do that directly on the service itself, or on the component if the output of the transformation is specific to a component, but a pipe is not the recommended way of doing that. 👍
@phuoctoanchauhuynh8557
@phuoctoanchauhuynh8557 4 ай бұрын
@@AngularUniversity Thank you for your advice, it helps me a lot. May I ask another question? In Angular 17, how can we define a global service, pipe, etc.. that all components can use it without import for each one (in Angular 17 they remove app.module.ts so I don't know how to do it).
@AngularUniversity
@AngularUniversity 4 ай бұрын
@@phuoctoanchauhuynh8557 Sure, use @Injectable({providedIn: 'root'}) on top of the service class, and the service will be injectable anywhere on the application: components, pipes, directives, etc.
Angular Mistakes #6: 🛑 STOP Overusing Centralized Stores
20:20
Angular University
Рет қаралды 5 М.
🚦NEW Angular 17 model() feature ... You MUST Know This!
11:19
Angular University
Рет қаралды 4,7 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 35 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 84 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,6 МЛН
Angular’s Third Era is…weird
21:41
Theo - t3․gg
Рет қаралды 90 М.
Master Figma UI Design in 15 Minutes | This Tutorial Is For You!
15:28
Website Learners
Рет қаралды 531 М.
VSCode is Not Enough Anymore in 2024
3:21
Dev Panda
Рет қаралды 12 М.
What is API ?
10:19
Hitesh Choudhary
Рет қаралды 1,6 МЛН
Javascript return vs return await (Crucial Difference)
10:33
Angular University
Рет қаралды 2,4 М.
Why Angular Signals? Write Your First Signal
14:25
Angular University
Рет қаралды 8 М.
💥 Angular support for the async/await syntax - it's confirmed. 👍
0:52
Angular University
Рет қаралды 1,7 М.
Angular AI Integration (Experimental): NgConf 2024 Recap
5:34
Angular University
Рет қаралды 4,6 М.
🚀 Angular async / await:  Can You Use It? (OFFICIAL Confirmation)
8:55
Angular University
Рет қаралды 6 М.
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 17 МЛН