Skip to content

Commit 1c6e399

Browse files
committed
remove deprecated render usage
1 parent dd3faa6 commit 1c6e399

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

src/tooltip/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PositioningLiteral, ReactUnity, Renderer, YogaValue2Aux } from '@reactunity/renderer';
1+
import { PositioningLiteral, ReactUnity, render, YogaValue2Aux } from '@reactunity/renderer';
22
import clsx from 'clsx';
33
import React, { ReactNode, useCallback, useLayoutEffect, useRef } from 'react';
44
import { useAutoRef } from '../util/hooks/use-auto-ref';
@@ -159,7 +159,7 @@ function addTooltip(target: ReactUnity.UGUI.UGUIComponent, props: TooltipProps,
159159
}
160160

161161
UnityBridge.appendChild(anchor, tooltip);
162-
Renderer.render(props.content, { disableHelpers: true, hostContainer: tooltip });
162+
render(props.content, { disableHelpers: true, hostContainer: tooltip });
163163

164164
UnityBridge.appendChild(target, anchor);
165165

@@ -252,7 +252,7 @@ export function useDataTooltip(trigger: TooltipTrigger = 'hover') {
252252
return useTooltip(props, trigger);
253253
}
254254

255-
function propsProxy(data: ReactUnity.Helpers.WatchableObjectRecord) {
255+
function propsProxy(data: ReactUnity.Reactive.ReactiveObjectRecord) {
256256
return new Proxy(data, {
257257
get(tg, prop) {
258258
if (typeof prop === 'symbol') return data[prop as any];

tsconfig.json

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
11
{
2-
"compileOnSave": false,
2+
"extends": "@reactunity/scripts",
33
"compilerOptions": {
44
"baseUrl": "./",
55
"outDir": "./dist",
6-
"sourceMap": true,
7-
"allowJs": true,
8-
"pretty": true,
9-
"declaration": false,
10-
"module": "esnext",
11-
"moduleResolution": "node",
12-
"preserveSymlinks": true,
13-
"importHelpers": false,
14-
"strict": true,
15-
"strictNullChecks": false,
16-
"noImplicitAny": false,
17-
"allowSyntheticDefaultImports": true,
18-
"jsx": "react-jsx",
196
"target": "ES5",
20-
"skipLibCheck": true,
21-
"lib": [],
22-
"preserveConstEnums": true,
23-
"esModuleInterop": true,
24-
"forceConsistentCasingInFileNames": true,
25-
"noFallthroughCasesInSwitch": true,
26-
"resolveJsonModule": true,
27-
"isolatedModules": true,
7+
"sourceMap": true,
8+
"noEmit": false,
289
"types": [
2910
"@reactunity/scripts/main",
3011
"@reactunity/scripts/ugui"

0 commit comments

Comments
 (0)