Alternatively, I could think of restricting the child components' type (it’s a TypeScript library anyway). Then, I could inject the property into the child, and it would just automagically work. I’ve done this countless times in Angular libs. I'm not sure if this is a thing in React, though. 🤷
0 likes 1 replies
?