react-navi
Version:
A batteries-included router for react.
17 lines • 781 B
JavaScript
import * as React from 'react';
import { NaviContext } from './NaviContext';
export function useHistory() {
if (process.env.NODE_ENV !== 'production') {
console.warn("Deprecation Warning: \"useHistory()\" is deprecated. It will be removed in a future version.");
}
return React.useContext(NaviContext).navigation._history;
}
export function History(props) {
React.useEffect(function () {
if (process.env.NODE_ENV !== 'production') {
console.warn("Deprecation Warning: \"<History>\" is deprecated. It will be removed in a future version.");
}
}, []);
return (React.createElement(NaviContext.Consumer, null, function (context) { return props.children(context.navigation._history); }));
}
//# sourceMappingURL=History.js.map