mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 01:57:16 +00:00
perf(RouteSchemaComponent): prevent unnecessary re-renders
This commit is contained in:
parent
15a68eef66
commit
c838ac70ad
@ -8,10 +8,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { RemoteSchemaComponent, useCurrentPageUid } from '../../../';
|
||||||
import { RemoteSchemaComponent } from '../../../';
|
|
||||||
|
|
||||||
export function RouteSchemaComponent() {
|
export function RouteSchemaComponent() {
|
||||||
const params = useParams();
|
const currentPageUid = useCurrentPageUid();
|
||||||
return <RemoteSchemaComponent onlyRenderProperties uid={params.name} />;
|
return <RemoteSchemaComponent onlyRenderProperties uid={currentPageUid} />;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user