This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Component.js | |
const Component = props => ( | |
<MyContext.Consumer> | |
{(context) => ( | |
<Foo | |
bar={props.bar} | |
baz={context.baz} | |
/> | |
)} | |
</MyContext.Consumer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Component extends React.Component { | |
constructor(props) { | |
super(props); | |
this.initialState = { | |
isBelowScrollLine: false | |
}; | |
this.scrollListener = this.scrollListener.bind(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jwplayer("myelement").setup({ | |
playlist: [{ | |
playlist: 'https://foo.bar/breaking-news.json' | |
}, | |
{ | |
playlist: 'https://foo.bar/normal-playlist.json' | |
}] | |
}) |