withFocusable uses arrow function

This commit is contained in:
NikolaBorislavovHristov 2019-04-17 15:33:37 +03:00
parent e76eb8a09f
commit e05642df3c

View file

@ -2,13 +2,11 @@ const React = require('react');
const FocusableContext = require('./FocusableContext'); const FocusableContext = require('./FocusableContext');
const withFocusable = (Component) => { const withFocusable = (Component) => {
return function withFocusable(props) { return (props) => (
return ( <FocusableContext.Consumer>
<FocusableContext.Consumer> {focusable => <Component {...props} focusable={focusable} />}
{focusable => <Component {...props} focusable={focusable} />} </FocusableContext.Consumer>
</FocusableContext.Consumer> );
);
};
}; };
module.exports = withFocusable; module.exports = withFocusable;