mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
JS: Propagate React components through recompose HOCs
This commit is contained in:
@@ -4,6 +4,7 @@ import { compose } from 'redux';
|
||||
import styled from 'styled-components';
|
||||
import unknownFunction from 'somewhere';
|
||||
import { hot } from 'react-hot-loader';
|
||||
import { withState } from 'recompose';
|
||||
|
||||
import { MyComponent } from './exportedComponent';
|
||||
|
||||
@@ -22,4 +23,6 @@ const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
const ConnectedComponent = compose(withConnect, unknownFunction)(StyledComponent);
|
||||
|
||||
export default hot(module)(memo(ConnectedComponent));
|
||||
const ConnectedComponent2 = withState('counter', 'setCounter', 0)(ConnectedComponent);
|
||||
|
||||
export default hot(module)(memo(ConnectedComponent2));
|
||||
|
||||
Reference in New Issue
Block a user