Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #516 from gtaylor44/master
Browse files Browse the repository at this point in the history
createFactory deprecation warning fix. See post https://blogreact.com…
  • Loading branch information
jonthomp authored May 28, 2020
2 parents 824e607 + 55a4a68 commit 395cfb3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Nav/Nav.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ class Nav extends React.Component<Props, State> {

let element: ?React.Element<*> = null;
if (routerContextComponentType) {
const routerContextComponentFactory = React.createFactory(

let createFactory = type => React.createElement.bind(null, type);

const routerContextComponentFactory = createFactory(
routerContextComponentType
);

element = routerContextComponentFactory({
callback: this.routerCallback,
});
Expand Down

0 comments on commit 395cfb3

Please sign in to comment.