Closed picklelo closed 11 months ago
What is the warning text?
Warning: State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().
Edit: I'm am able to consistently reproduce the warning with a full control text input in either Firefox 111.0.1 or Safari 16.3 on macOS 13.2.1.
pynecone-0.1.24
Example project:
import pynecone as pc
class State(pc.State):
var: str = "init"
app = pc.App(state=State)
@app.add_page
def index() -> pc.Component:
return pc.vstack(
pc.input(value=State.var, on_change=State.set_var),
pc.text_area(value=State.var, on_change=State.set_var),
)
app.compile()
I was having PATH
issues earlier and accidentally running the previous version without the full_control feature.
The entire full controlled input handling code has been removed.
The new controlled inputs/text areas works great, but throws a warning in the JS console that we should resolve.