Describe the bug
The rx.RestProp param does no additional processing of CSS props, so if any are passed through to a memo function, they end up as normal props, which are unrecognized on their target. There is no processing to distinguish them as style props.
To Reproduce
import reflex as rx
@rx._x.memo
def xmemo(rest: rx.RestProp) -> rx.Component:
return rx.text("Foo", rest)
def index() -> rx.Component:
return rx.container(
rx.vstack(
xmemo(font_weight="bold"),
rx.text("Bar", font_weight="bold"),
),
)
app = rx.App()
app.add_page(index)
Expected behavior
Both "Foo" and "Bar" should be bold text, but the xmemo variant does not apply the boldness.
Specifics (please complete the following information):
- Python Version: 3.10+
- Reflex Version: 0.9.4+ (or rx._x.memo in 0.9+)
- OS: any
Additional context
Workaround: pass the css props in a style dict
Describe the bug
The
rx.RestPropparam does no additional processing of CSS props, so if any are passed through to a memo function, they end up as normal props, which are unrecognized on their target. There is no processing to distinguish them as style props.To Reproduce
Expected behavior
Both "Foo" and "Bar" should be bold text, but the
xmemovariant does not apply the boldness.Specifics (please complete the following information):
Additional context
Workaround: pass the css props in a
styledict