Skip to content

Instantly share code, notes, and snippets.

@TrekSoft
Last active February 8, 2022 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TrekSoft/c6ecbbb12a5c33d3ff5f2afc131d49f4 to your computer and use it in GitHub Desktop.
Save TrekSoft/c6ecbbb12a5c33d3ff5f2afc131d49f4 to your computer and use it in GitHub Desktop.
Render two copies of the footer - HTML
{/* Floating copy */}
<div
className="footer--floating"
style={{ visibility: shouldFloatFooter ? 'visible' : 'hidden' }}
>
{renderFooter(shouldFloatFooter)}
</div>
{/* In flow copy */}
<div
ref={onFooterContainerChange}
style={{ visibility: shouldFloatFooter ? 'hidden' : 'visible' }}
>
{renderFooter(!shouldFloatFooter)}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment