The current API uses a component and callback which essentially forces the use of a class component. This is fine for smaller changes, but it doesn't compose well with other React HOC-based libraries.
An example with code splitting and conditional data fetching:
const CardGroup = compose(
withFeatureFlag("useNewCard"),
withRouter,
fetchData("cards", props => ({ id: props.params.postId })),
branch( // from recompose library
props => props.featureFlags.useNewCard === "A",
renderComponent(AsyncCardA), // code split
),
)(AsyncCardB); // code split
This can allow the A/B test to be completely transparent to the wrapped component, and it can be easily added or removed without adding custom wrapper components.
This should be possible to do while sharing code with the existing component, possibly as a simple wrapper.