Hacker News new | ask | show | jobs
by pier25 3274 days ago
Is anyone else here writing their GraphQL queries / REST calls in their components?

IMO coupling the data layer with the presentation layer is a terrible idea.

1 comments

They're not writing queries/API calls inside components. They're defining the components' data requirements alongside the components.
Now that I've paid more attention it seems I was wrong. They are actually injecting the query into the route.