#Context > Prop Drilling?
1 messages · Page 1 of 1 (latest)
Ignore best practices and just do what feels right
Some things just don't matter enough to waste energy on, for example this, context or prop drilling
That’s some great advice! And a trend I’ve been hearing recently. XD
I think it’s time to step out my my comfortable learning zone and in to the field proper.
It took a long while to wiggle out this imposter syndrome.
Prayers up 🙂
Like @granite hearth said, do what feels right - as long as it's appropriate and the code's readable. Personally I prop drill if I'm passing props down one or two components but when it gets to more than that I use context.
Personally it depends how many props I’m working with and how many components need them like how far down I would need to drill. I prefer context in most scenarios just because I know anything that needs it has access but for small projects or demos or situations whrre it only needs to go down one level, I’ll just pass the specific props down.
As someone who just went through that section:
I personally just fullsent it and got comfortable with context regardless of how many props I had to pass down
Both can be useful depending on the situation. The Context API is better for managing data across large applications where many components need access to the same state. On the other hand, props drilling is fine for simple cases where data is passed down through only a few components.
sorry ya'll just got back from a hunting trip with my son. I appreciate the feedback :))