DEV Community

Mahir-Ahsef
Mahir-Ahsef

Posted on

context API in reactjs

When numerous components at various nesting levels need access to the same data, context is employed. It should be used with caution because it makes component reuse more difficult. Component composition is typically a simpler approach than context if you merely want to avoid providing some props over several layers.

Top comments (0)