File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
examples/wasm-yew-minimal Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ edition = "2021"
66
77[dependencies ]
88plotly = { path = " ../../plotly" , features = [" wasm" ] }
9- yew = " 0.19 .0"
10- yew-hooks = " 0.1.56 "
9+ yew = " 0.21 .0"
10+ yew-hooks = " 0.3.2 "
1111log = " 0.4.6"
1212wasm-logger = " 0.2"
Original file line number Diff line number Diff line change @@ -18,14 +18,10 @@ pub fn plot_component() -> Html {
1818 Ok ( ( ) )
1919 }
2020 } ) ;
21-
22- use_effect_with_deps (
23- move |_| {
24- p. run ( ) ;
25- || ( )
26- } ,
27- ( ) ,
28- ) ;
21+ // Only on first render
22+ use_effect_with ( ( ) , move |_| {
23+ p. run ( ) ;
24+ } ) ;
2925
3026 html ! {
3127 <div id="plot-div" ></div>
@@ -34,5 +30,5 @@ pub fn plot_component() -> Html {
3430
3531fn main ( ) {
3632 wasm_logger:: init ( wasm_logger:: Config :: default ( ) ) ;
37- yew:: start_app :: < App > ( ) ;
33+ yew:: Renderer :: < App > :: new ( ) . render ( ) ;
3834}
You can’t perform that action at this time.
0 commit comments