File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ def Slideshow():
5656 url = f " https://picsum.photos/800/300?image= { index} "
5757 return idom.html.img({" src" : url, " onClick" : lambda event : set_index(index + 1 )})
5858
59- server = idom.server.sanic.PerClientState(Slideshow)
60- server.daemon(" localhost" , 8765 ).join()
59+ idom.run(Slideshow, port = 8765 )
6160```
6261
6362Running this will serve our slideshow to ` "https://localhost:8765/client/index.html" `
@@ -67,8 +66,8 @@ Running this will serve our slideshow to `"https://localhost:8765/client/index.h
6766You can even display the same thing in a Jupyter Notebook, just use [ ` idom_jupyter ` ] ( https://github.com/idom-team/idom-jupyter ) :
6867
6968``` python
70- from idom_jupyter import display
71- display (Slideshow)
69+ import idom_jupyter
70+ idom_jupyter.run (Slideshow)
7271```
7372
7473Every click will then cause the image to change (it won't here of course).
You can’t perform that action at this time.
0 commit comments