apprun 3.33.3 → 3.33.4
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/WHATSNEW.md +5 -4
- package/apprun.d.ts +1 -1
- package/package.json +1 -1
package/WHATSNEW.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
## What's New
|
|
2
2
|
|
|
3
|
-
> Aug 12, 2024, V3.33.
|
|
3
|
+
> Aug 12, 2024, V3.33.4
|
|
4
4
|
|
|
5
5
|
### Add app.use_render and app.use_react function
|
|
6
6
|
|
|
7
|
-
The `app.use_render` function allows you to use a custom render function for rendering the view
|
|
7
|
+
The `app.use_render` function allows you to use a custom render function for rendering the view. The `app.use_react` function allows you to use React for rendering the view.
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
|
-
import
|
|
10
|
+
import ReactDOM from 'react-dom/client'
|
|
11
|
+
import { flushSync } from 'react-dom';
|
|
11
12
|
import app from 'apprun';
|
|
12
|
-
|
|
13
|
+
use_react(React, ReactDOM);
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
See https://github.com/yysun/apprun-antd-demo-js for an example.
|
package/apprun.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ declare module 'apprun' {
|
|
|
58
58
|
webComponent(name: string, componentClass, options?: CustomElementOptions): void;
|
|
59
59
|
safeHTML(html: string): any[];
|
|
60
60
|
use_render(render, mode?: 0 | 1);
|
|
61
|
-
use_react(
|
|
61
|
+
use_react(React, ReactDOM);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export class Component<T = any, E = any> {
|