You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The approach I mentioned can be an extreme one too i.e. now, I have to provide the same interface/api in proto/IDatabase as the library/database that I'm building a component for
The text was updated successfully, but these errors were encountered:
Almost every usage of component in projects I've inherited got one important detail wrong about its usage
e.g.
Here's a trivial database component that usually gets created
And then, the entire codebase is littered with getting the
:connection
key out of the Database componente.g.
(some-database-library/query (:connection db-comp) query)
This feels wrong. You can never mock components this way
IMO the intention of the component library was to do the following
Now the rest of the code does the following
(db/query db-comp)
The approach I mentioned can be an extreme one too i.e. now, I have to provide the same interface/api in
proto/IDatabase
as the library/database that I'm building a component forThe text was updated successfully, but these errors were encountered: