Can React replace traditional progressive enhancement techniques?

470 Views Asked by At

I am working on a project that already uses React, but only for specific elements of the site. The owner just requested a field on a form not rendered by React to become visible only when a checkbox is checked. I know how to do this using native event listeners, and I'm not interested in rewriting the form to be a React component (I'd need identical output that matches the server-side rendering).

Since React is already present, is there a simple way to use it setup a binding between the checkbox value and the visibility of the other field? Basically traditional progressive enhancement but with React handling the state? My research so far suggests React cannot really work with nodes it didn't render.

0

There are 0 best solutions below