souporserious / react-media-player

React audio and video player.
https://souporserious.github.io/react-media-player/
ISC License
470 stars 100 forks source link

Export undecorated components as named exports #76

Closed mickmister closed 4 years ago

mickmister commented 5 years ago

Thanks for making this great library! I have a use case where I want to compose a UI out of the controls in this library, but I don't want to use the Media component. The way the components are written, the this.props.media can easily be used without the media context.

@souporserious I'm not sure if you agree with the style of named exports and default exports in the same file, but this approach shouldn't break anything. I think allowing this can make the library much more powerful.

mickmister commented 4 years ago

@souporserious Do you have an opinion on this proposal?

mickmister commented 4 years ago

@souporserious Really hoping you'll consider this. There shouldn't be any backwards compatibility issues, and fits nicely with the encapsulation of the inner components. Please take a quick a look if you get the chance.