Skip to content

Instantly share code, notes, and snippets.

@moaible
Created March 24, 2017 05:15
Show Gist options
  • Select an option

  • Save moaible/3b6fd736bc7455cd4818a3aa48ce0ff4 to your computer and use it in GitHub Desktop.

Select an option

Save moaible/3b6fd736bc7455cd4818a3aa48ce0ff4 to your computer and use it in GitHub Desktop.
react-sticky sample
/* @flow */
import React from 'react'
import { StickyContainer, Sticky } from 'react-sticky'
import Header from '../../components/header'
import Footer from '../../components/footer'
type Props = {
children: React.Children
}
export default class LayoutContainer extends React.Component {
constructor(props: Props) {
super(props)
console.log(props)
}
render() {
return (
<StickyContainer>
<Header/>
{this.props.children}
<Sticky>
<Footer/>
</Sticky>
</StickyContainer>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment