bvaughn / react-virtualized-auto-sizer

Standalone version of the AutoSizer component from react-virtualized
MIT License
613 stars 82 forks source link

Is it possible to render content inside auto sizer callback on server? #75

Closed zubairhasrat closed 1 year ago

zubairhasrat commented 1 year ago

I want to render content inside callback in auto sizer to be rendered on server is that possible?

<AutoSizer>
   {() => <div>this needs to be server side rendered</div>}
</AutoSizer>
bvaughn commented 1 year ago

Use the defaultHeight and defaultWidth props for this. As the docs mention, they are for server rendering fallback.