Will it be better to use one field constructor?
e.g. In artwork repo
For client side code:
export function getArtworks() {
const pplRepo = new PeopleRepository(FirebaseApp);
const awRepo = new ArtworksRepository(FirebaseApp, pplRepo);
// ...
}
export async function createArtwork(artwork) {
const pplRepo = new PeopleRepository(FirebaseApp);
const awRepo = new ArtworksRepository(FirebaseApp, pplRepo);
// ...
Instead const pplRepo = new PeopleRepository(FirebaseApp); can be created from the library or as a optional field.
Will it be better to use one field constructor?
e.g. In artwork repo
For client side code:
Instead
const pplRepo = new PeopleRepository(FirebaseApp);can be created from the library or as a optional field.