DeloitteAU / react-habitat

⚛️ 🛅 A React DOM Bootstrapper designed to harmonise a hybrid 'CMS + React' application.
Other
262 stars 42 forks source link

[Question] Is it possible to update props from outside after component is rendered #50

Open iamthefox opened 4 years ago

iamthefox commented 4 years ago

Is it possible to update props from outside after component is rendered?

Example: I have non-react form with a single react component bound via habitat. There is a checkbox next to react component which dictates wether react component should be enabled or disabled. What would be the best approach to update props after react component was already bound and rendered.

BramKaashoek commented 4 years ago

It is not.

Since this package has received few updates of the last years I decided to write my own version at https://www.npmjs.com/package/react-abode.

It will automatically detect prop changes and rerender your react component.

jennasalau commented 4 years ago

Im open if someone wants to be added as a maintainer... dont get much free time for this anymore