What is a provider in React/Next.js?

Open questions

Q: Can context / providers be used with RSC? What limitations apply?

WHY:

Helps you avoid prop drilling (similar to a HOC: higher order component)

Examples:

https://react-redux.js.org/api/provider

Alternatives

Zustand? Interesting... https://codedamn.com/news/reactjs/using-the-react-context-provider#alternatives_to_react_context_provider

More reading

https://javascript.plainenglish.io/what-is-a-provider-in-react-redux-ed5f6991550c https://flexiple.com/react/provider-pattern-with-react-context-api https://codedamn.com/news/reactjs/using-the-react-context-provider https://mortenbarklund.com/blog/react-architecture-provider-pattern/

https://react.dev/learn/passing-data-deeply-with-context https://react.dev/reference/react/useContext