Skip to content

Commit

Permalink
fix: trying to get the props through the HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
MadaraUchiha-314 committed Apr 30, 2020
1 parent 7e2273c commit fd1d068
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/TextProviderHOC.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { TextContext } from './TextProvider';

const withTextProvider = (SomeComponent) => { /* eslint-disable-line no-unused-vars */
const withTextProvider = (SomeComponent) => {
/* eslint-disable-line no-unused-vars */
class TextProviderHOC extends React.Component {
constructor(props) {
super(props);
Expand All @@ -20,6 +21,7 @@ const withTextProvider = (SomeComponent) => { /* eslint-disable-line no-unused-v
return (
<SomeComponent
getTextForKey={this.getTextForKey}
{...this.props} /* eslint-disable-line react/jsx-props-no-spreading */
/>
);
}
Expand Down

0 comments on commit fd1d068

Please sign in to comment.