|
|
|
|
|
by kalkut
2900 days ago
|
|
You can make any suitable variation of the following pattern. You build a DataSource class/prototype with methods such as : - fetch - addChangeListener - removeChangeListener You extend this class for each data type : class CommentsData extends DataSource {
// Your custom data source with your data treatment and data getters
}
And you use the Higher-Order Component pattern: https://reactjs.org/docs/higher-order-components.html |
|
I'm not a fan of Redux either, but I fail to see what problems this approach solves.