@cassette/core
Version:
A simple, clean, and responsive visual wrapper for the HTML audio tag, built with React.
24 lines (19 loc) • 490 B
Markdown
This is the recommended way to consume context.
```jsx static
class MyControl extends React.Component {
render() {
const { playlist, activeTrackIndex, fullscreen } = this.props;
// ...
}
}
export default playerContextFilter(MyControl, [
'playlist',
'activeTrackIndex',
'fullscreen'
]);
// and to call it...
<PlayerContextProvider {...providerProps}>
{/* automatically consumes the props specified in the source file */}
<MyControl />
</PlayerContextProvider>;
```