Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
The only way I can think to do this is do to what react-bootstrap does with it's NavbarContext. So I can create a property in my context which indicates whether or not the theme is currently responsive, set by the window scroll event listener in the parent mentioned above. The child components can then import and refer to that context to see the responsive status of the theme and I can style it's CSS according (by assigning a .responsive class), allowing me to decouple the optional component's CSS from the parent.