DevAshleyD / react-video-render-prop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-video-render-prop Build StatusDependency Statuscodecov

React render props, what are they?

After reading this PR facebook/react#10741 I wondered what the benefits were.

TL;DR: It's a slightly different way of getting child state visible in the parent component.

The only slight issue I had was getting coverage on 'just' the unit, my usual workflow has me mocking subcomponents. The child component had to render in order to exercise the inline component in the parent's render function.

Brief description

Super basic create react app project to see what the render props pattern is all about.

Live demo: https://globalroo.github.io/react-video-render-prop/

npm install yarn -g
yarn
yarn test (tdd)
yarn testcov (coverage - generated to ./coverage)
yarn start or
yarn build (for a production version - generated to ./build)

About

License:MIT License


Languages

Language:JavaScript 78.2%Language:HTML 16.8%Language:CSS 4.7%Language:Shell 0.3%