title: Can't stick my header component using react-sticky
body: <p>I'm developing a website and I wan't to stick my header component. I'm developing using <code>react</code> and <code>react-sticky</code> lib from <a href="https://www.npmjs.com/package/react-sticky" rel="nofollow noreferrer">https://www.npmjs.com/package/react-sticky</a></p>
  
  <p>Here is my file that I use <code>sticky</code>.</p>
  
  <pre><code>import React from 'React'
  import { StickyContainer, Sticky } from 'react-sticky'
  
  class main extends React.Component {
    render () {
      return (
        &lt;StickyContainer&gt;
          &lt;Sticky&gt;
            {({style}) =&gt; (
              &lt;components.common.header style={style}/&gt;
            )}
          &lt;/Sticky&gt;
          &lt;components.common..... /&gt;
          &lt;components.common..... /&gt;
          &lt;components.common..... /&gt;
          &lt;components.common.footer /&gt;
        &lt;/StickyContainer&gt;
      )
    }
  }
  
  export default main
  </code></pre>
  
  <p>This is my <code>webpack.config.js</code>: </p>
  
  <pre><code>const path = require('path')
  const MiniCssExtractPlugin = require('mini-css-extract-plugin')
  const merge = require('webpack-merge')
  const webpack = require('webpack')
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  const env = require('./src/env.js')
  const TARGET = process.env.npm_lifecycle_event
  process.env.BABEL_ENV = TARGET
  
  const PATHS = {
    app: path.join(__dirname, 'src'),
    build: path.join(__dirname, 'build'),
    assets: path.join(__dirname, 'assets')
  }
  
  const common = {
    entry: [PATHS.app],
    module: {
      rules: [
        {
          test: /\.json$/,
          loader: 'json-loader'
        },
        {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          include: PATHS.app,
          loaders: ['babel-loader']
        },
        {
          test: /\.css$/,
          use: [MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { modules: true } }],
          include: /flexboxgrid/
        },
        {
          test: /\.scss$/,
          exclude: /flexboxgrid/,
          use: [
            MiniCssExtractPlugin.loader,
            { loader: 'css-loader', options: { modules: true } },
            'sass-loader'
          ]
        },
        {
          test: /\.jpe?g$|\.gif$|\.png$/i,
          loader: 'url-loader?name=[name].[ext]'
        },
        {
          test: /\.otf$|\.eot$|\.svg$|\.ttf|\.woff|\.woff2$/,
          loader: 'url-loader?name=[name].[ext]'
        }
      ]
    },
    resolve: {
      extensions: ['.js', '.jsx'],
      modules: ['node_modules', path.resolve(__dirname, './node_modules')],
      mainFields: ['browser', 'web', 'browserify', 'main', 'style']
    }
  }
  
  if (TARGET === 'start' || !TARGET) {
    module.exports = merge(common, {
      module: {
        rules: [
          {
            test: /\.jsx?$/,
            use: ['source-map-loader'],
            enforce: 'pre'
          }
        ]
      },
      devtool: 'inline-source-map',
      devServer: {
        contentBase: PATHS.build,
        historyApiFallback: true,
        hot: true,
        inline: true,
        progress: true,
        stats: 'errors-only',
        https: true,
        host: env.host,
        port: env.port,
        overlay: {
          errors: true
        },
        watchOptions: {
          watch: true
        }
      },
      plugins: [
        new MiniCssExtractPlugin({ filename: 'assets/style.css' }),
        new webpack.HotModuleReplacementPlugin(),
        new HtmlWebpackPlugin({
          template: PATHS.app + '/index.html',
          inject: 'body'
        })
      ],
      output: {
        path: PATHS.build,
        filename: 'bundle.js',
        publicPath: '/'
      }
    })
  }
  
  if (TARGET === 'production') {
    module.exports = merge(common, {
      plugins: [
        new MiniCssExtractPlugin({ filename: 'style.css' }),
        new webpack.optimize.OccurenceOrderPlugin(),
        new webpack.DefinePlugin({
          'process.env': {
            NODE_ENV: "'production'"
          }
        })
      ],
      output: {
        path: '/build',
        filename: 'bundle.js'
      }
    })
  }
  </code></pre>
  
  <p>I'm not receiving any error from console, the problem is the Header isn't sticking at the top.</p>
  
  <p>Can anyone help me?</p>
  
  <p>Thanks!</p>
  
  <h2>EDIT</h2>
  
  <p>After more testing I see that <code>style</code> is empty. And then, when I change the screen size, it became filled and work.</p>
  
  <p>There is one way to force this screen update?</p>