DEV Community

Discussion on: Random Quote App - Angular vs. React vs. Vue Comparison

Collapse
 
hakimio profile image
Tomas Rimkus • Edited

That's a strange implementation. Your quote-box should be only a "display" component. It doesn't need getNewQuote() function as an input. To implement it properly in Angular, you would create getNewQuoteClick output/event emitter in your "quote-box" component and then when the event is triggered you would set a new quote from your parent component. Also, it might be a good idea to introduce a new service for getting quotes instead of putting all the logic in the app.component.ts. And one more small remark: we use HttpClient service in Angular instead of fetch().

Collapse
 
corscheid profile image
Corey Scheideman

Thanks for the great info and suggestions here! I'll fix these things and update soon. I knew something was a bit off, but now that you bring some of that up, I'm wondering how I didn't think of it. Cheers!