BlogsDatadogReusable React-Redux Component Scoping

Reusable React-Redux Component Scoping

Reusable React-Redux Component Scoping

1
posts
2016

Datadog developed Redux-Doghouse, a library to create reusable React-Redux components by scoping actions and reducers. This allows multiple instances of a component to operate independently within a larger Redux application, preventing action conflicts. The library was used to rebuild Datadog's Query Editor and Expression Editor, enabling reuse across different parts of the application while maintaining independent functionality.

2016

Redux-Doghouse: Creating reusable React-Redux components through scoping | Datadog

11/14/2016

Introduced Redux-Doghouse, a library for creating Scoped Actions and Scoped Reducers in React-Redux applications. This pattern addresses the conflict arising when multiple instances of a component dispatch actions of the same type, by composing a unique scope onto each instance's action creators and reducers. This allows actions to be routed only to their corresponding reducers, while still enabling higher-level components to react to these scoped actions and access child component states.