I'm working on a project utilizes Redux for managing states of the app. As we know, in Redux there is a principle rule called having only one source of truth which simply means there is just a single JS value containing all of the existing states of the app, called store. So in this store we kind of reserve every states with a unique parameter. For Example in the mapStateToProps function:
const mapStateToProps = state => myInfo: state.users.myInfo
As you can see, in this case state.users
is get reserved as an object in the state of the app. However in another part of the project I need to work with another API which its response contains an array with property of "users" (BTW it can not get changed, it should handle in Front-End). So I cannot use something like activeUsers: state.users
in another component and get back an array of active users.
My question is can I use context API state manager for the new part of the project to handle this parameter duplication issue?