Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@umijs/renderer-react

Package Overview
Dependencies
Maintainers
10
Versions
656
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umijs/renderer-react - npm Package Compare versions

Comparing version 4.3.18 to 4.3.19

2

dist/browser.d.ts

@@ -91,2 +91,2 @@ import { History } from 'history';

*/
export declare function renderClient(opts: RenderClientOpts): (() => React.JSX.Element) | undefined;
export declare function renderClient(opts: RenderClientOpts): (() => JSX.Element) | undefined;
import React from 'react';
import { IHtmlProps } from './types';
export declare function Html({ children, loaderData, manifest, htmlPageOpts, __INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, mountElementId, }: React.PropsWithChildren<IHtmlProps>): React.JSX.Element;
export declare function Html({ children, loaderData, manifest, htmlPageOpts, __INTERNAL_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, mountElementId, }: React.PropsWithChildren<IHtmlProps>): JSX.Element;

@@ -5,2 +5,2 @@ import React, { PropsWithChildren } from 'react';

prefetch?: boolean;
} & LinkProps & React.RefAttributes<HTMLAnchorElement>>): React.JSX.Element | null;
} & LinkProps & React.RefAttributes<HTMLAnchorElement>>): JSX.Element | null;

@@ -20,3 +20,3 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";

case 0:
basename = '/';
basename = opts.basename || '/';
components = _objectSpread({}, opts.routeComponents); // todo 参数对齐

@@ -34,3 +34,9 @@ clientRoutes = createClientRoutes({

});
rootContainer = /*#__PURE__*/React.createElement(StaticRouter, {
rootContainer =
/*#__PURE__*/
// 这里的 location 需要包含 basename, 否则会影响 StaticRouter 的匹配.
// 由于 getClientRootComponent 方法会同时用于 ssr 和 ssg, 所以在调用该方法时需要注意传入的 location 是否包含 basename.
// 1. 在用于 ssr 时传入的 location 来源于 request.url, 它是包含 basename 的, 所以没有问题.
// 2. 但是在用于 ssg 时(static export), 需要注意传入的 locaiton 要拼接上 basename.
React.createElement(StaticRouter, {
basename: basename,

@@ -37,0 +43,0 @@ location: opts.location

@@ -67,2 +67,3 @@ /// <reference types="react" />

manifest: any;
basename?: string;
}

@@ -69,0 +70,0 @@ export interface IHtmlProps extends IHtmlHydrateOptions {

@@ -17,2 +17,2 @@ import React from 'react';

}
export declare function withRouter<P extends RouteComponentProps<P>>(Component: React.ComponentType<P>): (props: P) => React.JSX.Element;
export declare function withRouter<P extends RouteComponentProps<P>>(Component: React.ComponentType<P>): (props: P) => JSX.Element;
{
"name": "@umijs/renderer-react",
"version": "4.3.18",
"version": "4.3.19",
"description": "@umijs/renderer-react",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/umijs/umi/tree/master/packages/renderer-react#readme",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc