diff --git a/README.md b/README.md index 0c1e0014..505f5e2f 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,10 @@ def users_table() -> list[AnyComponent]: c.Page( # Page provides a basic container for components components=[ c.Heading(text='Users', level=2), # renders `

Users

` - c.Table[User]( # c.Table is a generic component parameterized with the model used for rows + c.Table( data=users, + # data_model defines a model used for rows + data_model=User, # define two columns for the table columns=[ # the first is the users, name rendered as a link to their profile @@ -84,7 +86,6 @@ def users_table() -> list[AnyComponent]: ), ] - @app.get("/api/user/{user_id}/", response_model=FastUI, response_model_exclude_none=True) def user_profile(user_id: int) -> list[AnyComponent]: """