@umijs/renderer-react 4.3.35 → 4.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +2 -3
- package/dist/link.d.ts +1 -1
- package/dist/withRouter.d.ts +1 -1
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -147,9 +147,8 @@ var getBrowser = function getBrowser(opts, routesElement) {
|
|
|
147
147
|
matchedRouteIds.forEach(function (id) {
|
|
148
148
|
var _opts$routes$id, _opts$routes$id2;
|
|
149
149
|
// preload lazy component
|
|
150
|
-
// window.
|
|
151
|
-
|
|
152
|
-
if (window.__umi_manifest__) {
|
|
150
|
+
// window.__umi_route_prefetch__ is available when routePrefetch and manifest config is enabled
|
|
151
|
+
if (window.__umi_route_prefetch__) {
|
|
153
152
|
var _opts$routeComponents;
|
|
154
153
|
// ref: https://github.com/facebook/react/blob/0940414/packages/react/src/ReactLazy.js#L135
|
|
155
154
|
var lazyCtor = (_opts$routeComponents = opts.routeComponents[id]) === null || _opts$routeComponents === void 0 || (_opts$routeComponents = _opts$routeComponents._payload) === null || _opts$routeComponents === void 0 ? void 0 : _opts$routeComponents._result;
|
package/dist/link.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import React, { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { LinkProps } from 'react-router-dom';
|
|
3
3
|
export declare function LinkWithPrefetch(props: PropsWithChildren<{
|
|
4
4
|
prefetch?: boolean;
|
|
5
|
-
} & LinkProps & React.RefAttributes<HTMLAnchorElement>>): JSX.Element | null;
|
|
5
|
+
} & LinkProps & React.RefAttributes<HTMLAnchorElement>>): React.JSX.Element | null;
|
package/dist/withRouter.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ export interface RouteComponentProps<T = ReturnType<typeof useParams>> {
|
|
|
14
14
|
params?: T;
|
|
15
15
|
navigate?: ReturnType<typeof useNavigate>;
|
|
16
16
|
}
|
|
17
|
-
export declare function withRouter<P extends RouteComponentProps<P>>(Component: React.ComponentType<P>): (props: P) => JSX.Element;
|
|
17
|
+
export declare function withRouter<P extends RouteComponentProps<P>>(Component: React.ComponentType<P>): (props: P) => React.JSX.Element;
|
package/package.json
CHANGED