11Examples
22========
33
4- You can find the following examples and more on binder |launch-binder |:
4+ You can also try these examples out on binder |launch-binder |:
55
66.. contents ::
77 :local:
88 :depth: 1
99
1010
11- Display Function
12- ----------------
11+ Displaying These Examples
12+ -------------------------
1313
1414Depending on how you plan to use these examples you'll need different
1515boilerplate code.
@@ -18,12 +18,6 @@ In all cases we define a ``display(element)`` function which will display the
1818view. In a Jupyter Notebook it will appear in an output cell. If you're running
1919``idom `` as a webserver it will appear at http://localhost:8765/client/index.html.
2020
21- .. note ::
22-
23- The :ref: `Shared Client Views ` example requires ``SharedClientStateServer `` server instead
24- of the ``PerClientStateServer `` server shown in the boilerplate below. Be sure to wwap it
25- out when you get there.
26-
2721
2822**Local Python File **
2923
@@ -138,36 +132,6 @@ Click the bars to trigger an event 👇
138132.. example :: custom_chart
139133
140134
141- Shared Client Views
142- -------------------
143-
144- This example requires the :class: `~idom.server.sanic.SharedClientStateServer `. Be sure
145- to replace it in your boilerplate code before going further! Once you've done this we
146- can just re-display our :ref: `Slideshow ` example using the new server. Now all we need
147- to do is connect to the server with a couple clients to see that their views are synced.
148- This can be done by navigating to the server URL in seperate browser tabs. Likewise if
149- you're using a Jupyter Notebook you would display it in multiple cells like this:
150-
151- **Jupyter Notebook **
152-
153- .. code-block ::
154-
155- # Cell 1
156- ... # boiler plate with SharedClientState server
157-
158- # Cell 2
159- ... # code from the Slideshow example
160-
161- # Cell 3
162- widget = display(Slideshow)
163-
164- # Cell 4
165- widget # this is our first view
166-
167- # Cell 5
168- widget # this is out second view
169-
170-
171135Material UI Slider
172136------------------
173137
@@ -178,16 +142,6 @@ Move the slider and see the event information update 👇
178142.. example :: material_ui_slider
179143
180144
181- Semantic UI Buttons
182- -------------------
183-
184- Assuming you already installed ``semantic-ui-react `` as in the :ref: `Install Javascript Modules ` section:
185-
186- Click the buttons and see the event information update 👇
187-
188- .. example :: primary_secondary_buttons
189-
190-
191145.. Links
192146.. =====
193147
0 commit comments