The withStateMachine HOC function returns a component that doesn't inherit its child component's static properties. This becomes a problem when using libraries like React Navigation and others that depend on their users implementing static properties for customization. Here's a link to the React docs about the importance of lifting the static properties when creating a HOC: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over. I ran yarn test, and the tests seem to pass with these changes.
The
withStateMachine
HOC function returns a component that doesn't inherit its child component's static properties. This becomes a problem when using libraries like React Navigation and others that depend on their users implementing static properties for customization. Here's a link to the React docs about the importance of lifting the static properties when creating a HOC: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over. I ranyarn test
, and the tests seem to pass with these changes.Thanks for your time!