reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Investigate initial app state

Open picklelo opened this issue 2 years ago β€’ 0 comments

Currently we require the user to specify the base state when defining the app:

app = rx.App(state=MyState)

However, we also have a requirement that the base state MyState should subclass from rx.State. Therefore, we should be able to infer the baser state as the one (and only) subclass of rx.State and the user shouldn't have to specify it.

We can also catch errors if multiple classes subclass from rx.State which is a common beginner mistake when using subclasses.

picklelo avatar Jun 29 '23 18:06 picklelo