Skip to content

Instantly share code, notes, and snippets.

@homeslicesolutions-zz
Last active December 6, 2016 00:23
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 homeslicesolutions-zz/51898060165f07d07570963e7f890ecb to your computer and use it in GitHub Desktop.
Save homeslicesolutions-zz/51898060165f07d07570963e7f890ecb to your computer and use it in GitHub Desktop.
Stick Container with a Custom Tag
import React from "react";
import {StickyContainer} from "react-sticky";
class StickyContainerCustomTag extends StickyContainer {
render() {
const tagName = this.props.tagName || 'div';
const props = {...this.props};
delete props.tagName;
return React.createElement(tagName, props, props.children);
}
}
export default StickyContainerCustomTag;
@homeslicesolutions-zz
Copy link
Author

Update to support React 15.2 verification of white-list DOM attributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment