defineState()
defineState()
to declare your state. defineState()
takes an object as an argument and sets it as the initial value.
.value
.value
property as shown below.
topPageState.
and defineState()
every time as in this example, you can shorten it by destructuring the variables..update()
update()
method.
defineState()
. For details, see Input Components. By using these input components, you can easily reflect user input in the state.
variables
. By passing the values of the state declared with defineState()
to this property, you can pass user-entered values to Python functions or SQL files.
By combining all the features we have seen so far, you can create a data app like the example below.