tRPC - the best pattern? and how do you write a test? Use storybook?
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
Hi guys, im trying to define the best pattern for my tRPC application
Correct me if im wrong but instead of having a trpc query on a parent component and then passing down the props, its better to have the query in the child components, because:
1. the query is only sent once and cached, so it doesn't matter how many times you call it
2. the components become more self suffiencent and testable.
3. How do you write a test / use storybook for componenents?
Correct me if im wrong but instead of having a trpc query on a parent component and then passing down the props, its better to have the query in the child components, because:
1. the query is only sent once and cached, so it doesn't matter how many times you call it
2. the components become more self suffiencent and testable.
3. How do you write a test / use storybook for componenents?