File tree 5 files changed +15
-7
lines changed
5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 5
5
"check" : " prettier --check . && eslint"
6
6
},
7
7
"devDependencies" : {
8
- "@types/react" : " ^18.2.48" ,
9
- "@types/react-dom" : " ^18.2.18" ,
10
8
"eslint" : " ^9.13.0" ,
11
9
"eslint-plugin-react" : " ^7.37.1" ,
12
10
"prettier" : " ^3.3.3"
15
13
"@pyscript/core" : " ^0.6" ,
16
14
"@reactpy/client" : " ^0.3.2" ,
17
15
"event-to-object" : " ^0.1.2" ,
18
- "morphdom" : " ^2.7.4"
16
+ "morphdom" : " ^2.7.4" ,
17
+ "preact" : " ^10.25.4"
19
18
}
20
19
}
Original file line number Diff line number Diff line change 1
1
import { DjangoFormProps , HttpRequestProps } from "./types" ;
2
- import React from "react " ;
3
- import ReactDOM from "react-dom " ;
2
+ import React from "preact/compat " ;
3
+ import ReactDOM from "preact/compat " ;
4
4
/**
5
5
* Interface used to bind a ReactPy node to React.
6
6
*/
Original file line number Diff line number Diff line change 1
1
import { ReactPyDjangoClient } from "./client" ;
2
- import React from "react" ;
3
- import ReactDOM from "react-dom" ;
2
+ import ReactDOM from "preact/compat" ;
4
3
import { Layout } from "@reactpy/client/src/components" ;
5
4
6
5
export function mountComponent (
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "esModuleInterop" : true ,
4
+ "jsx" : " react-jsx" ,
5
+ "jsxImportSource" : " preact" ,
6
+ "target" : " esnext" ,
7
+ "module" : " esnext" ,
8
+ "moduleResolution" : " node"
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments