MCPcopy Index your code
hub / github.com/reactive-python/reactpy / PrintView

Function PrintView

docs/docs_app/examples.py:122–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120
121 @reactpy.component
122 def PrintView():
123 text, set_text = reactpy.hooks.use_state(print_buffer.getvalue())
124 print_buffer.set_callback(set_text)
125 return (
126 reactpy.html.pre({"class_name": "printout"}, text)
127 if text
128 else reactpy.html.div()
129 )
130
131 return Wrapper()
132

Callers 1

WrapperFunction · 0.85

Calls 3

use_stateMethod · 0.80
getvalueMethod · 0.80
set_callbackMethod · 0.80

Tested by

no test coverage detected