@@ -14,7 +14,7 @@ import * as paths from '../constants/paths';
1414 * This is used for the client rendering hook after the page html is rendered.
1515 * React will see that the state is the same and not do anything.
1616 */
17- function NavigationBarApp ( _props , railsContext ) {
17+ function NavigationBarAppFactory ( _props , railsContext ) {
1818 // This is where we get the existing store.
1919 const { pathname } = railsContext ;
2020 let store ;
@@ -23,16 +23,20 @@ function NavigationBarApp(_props, railsContext) {
2323 } else if ( pathname === paths . NO_ROUTER_PATH ) {
2424 store = ReactOnRails . getStore ( 'commentsStore' , false ) ;
2525 } else {
26- return ( ) => < NavigationBar { ...{ pathname } } /> ;
26+ return function NavigationBarApp ( ) {
27+ return < NavigationBar { ...{ pathname } } /> ;
28+ } ;
2729 }
2830
2931 // eslint interprets the return as a new component definition, which is not the case
3032 // eslint-disable-next-line react/display-name, react/no-unstable-nested-components
31- return ( ) => (
32- < Provider store = { store } >
33- < NavigationBarContainer />
34- </ Provider >
35- ) ;
33+ return function NavigationBarApp ( ) {
34+ return (
35+ < Provider store = { store } >
36+ < NavigationBarContainer />
37+ </ Provider >
38+ ) ;
39+ } ;
3640}
3741
38- export default NavigationBarApp ;
42+ export default NavigationBarAppFactory ;
0 commit comments