withHistory<InnerP, OutterP> function

ComponentEnhancer<InnerP, OutterP> withHistory<InnerP, OutterP>(
  1. HistoryMapper<InnerP, OutterP> mapper
)

withHistory will transform the props with the mapper funtion provided before invoking baseComponent the mapper function is passed an instance of History. This should only be used if the component has an ancestor of type HistoryProvider

Implementation

ComponentEnhancer<InnerP, OutterP> withHistory<InnerP, OutterP>(
        HistoryMapper<InnerP, OutterP> mapper) =>
    withContext(
        (props, context) => mapper(props, findHistoryInContext(context)));