So what about a service that's shared between components? Take a classic CRUD application where one of the objects being CRUDded is a Widget. Normally I would have a Widgets component (that would take care of the list and delete functionality) and a CreateOrEditWidget component, and a WidgetService class that handled the backend interaction. Would I define the WidgetService in my main Widgets component and import it into CreateOrEditWidget?

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Aurelia Fenderson-Peters
Aurelia Fenderson-Peters

Written by Aurelia Fenderson-Peters

20+ years writing code of various sorts. Full of trans magic.

No responses yet

Write a response