letoast
Explore posts from serversAdding to composable using a Layer
there's also one more problem i noticed. if there's a composable
useX.ts
in layer A that's defined as
and we override get.ts
in layer B
layer B's get.ts
doesn't override layer A's get.ts
- it doesn't seem to include them32 replies
Adding to composable using a Layer
The reason is that there would be multiple layers that would add different functionalities depending on the layer's needs, but the core functionality should be there. I don't want to duplicate the core functionality to each layer. I'll give you an example
layers/tenant1/
layers/tenant2/
layers/tenant3/
layers/base/
...
where the app is basically made to be multi tenant/version. There are different developers working on this and I would like to force this composable to have a certain basic structure. I know I could create a type definition for the composable and extend it in each layer, but is there any way to force the composable to have a type in each layer without importing the type each time?
The only way I see this being possible now is splitting the composable to multiple composables or the type way which I wrote above.
32 replies