golfclub icon indicating copy to clipboard operation
golfclub copied to clipboard

responsiveBox was removed

Open ilaborde opened this issue 8 years ago • 1 comments

Hi, Im starting a new application using DevExtreme and I was thinking uses ResponsiveBox to make the site responsive, but watching this examples I found a commit where the ResponsiveBox was deleted, so is ResponsiveBox necessary or maybe can I use only css ? Thanks

ilaborde avatar Apr 04 '18 14:04 ilaborde

ResponsiveBox itself is based on flexbox CSS styles. So, you can remove ResponsiveBox and use just CSS to create the required layout. But, when using ResponsiveBox, you simply need to specify your rows and columns and the position of your content in the ResponsiveBox table. Implementing this layout purely with CSS may be tricky, especially if a developer is not quite familiar with flexboxes. ResponsiveBox is designed to resolve this problem. You just provide it with your JavaScript configuration object and ResponsiveBox will render all necessary markup with necessary CSS styles automatically.   As for this particular demo, yes, we removed ResponsiveBox from it since we supported Server-Side Rendering in the demo. ResponsiveBox needs the browser size to render its markup in an adaptive way. Obviously, the server does not know the browser size. Yes, it is still possible to use ResponsiveBox in this demo. But, it's almost likely it will re-render its content just after loading the page because it will need to adapt the content based on the client browser size. So, this makes using ResponsiveBox in this demo senseless.

GoshaFighten avatar Apr 04 '18 16:04 GoshaFighten