It just helps you compose your props, that you can use anywhere later. Nothing more.
Yes! We have integrations for all of them:
Not at all. We have an integration package for ease of Redux usage too:
Redux is meant for state management for your whole application, based on actions and reducers.
Proppy is aimed at lifting the logic one level above your Components, and only deal with the behaviour of their props.
And the Redux store, for example, can be one of the providers here.
Proppy is unopinionated about what you use for your application's state management, and doesn't lock you in to any specific state management or rendering library.
Recompose has been the original inspiration for building ProppyJS.
A few key differences:
Absolutely! At the end of the day Proppy only composes props, and allows you to subscribe to them too.
RxJS fits in very nicely here. With
proppy-rx package, you have access to incoming props stream as an Observable, and you are in full control of what props get output via returning Obsevable.
When you use Proppy with any rendering library, you end up wrapping your base components with the
attach higher-order component.
This means every time you use the
attach higher-order component, you are creating one more stateful component which takes care of creating the Proppy instance internally and keep passing the generated props to the base component.
This layer of abstraction has its costs, because it is adding one more component to your tree. But at the same time, Proppy arms you with functions like
shouldUpdate which helps you control when new props are passed down to your base component trigerring a re-render.
In the end, it can be considered that the benefits outweigh any performance cost that is introduced because of this additional component in your tree.