Skip to content

Missing derive or rw_slice macros? #4046

@lukexor

Description

@lukexor

Is your feature request related to a problem? Please describe.

I really enjoy the convenience of laying down a memo! or slice! macro when dealing with complex props into components that come from an API with lots of fields, but the docs for Memo says:

Memos have a certain overhead compared to derived signals. In most cases, you should create a derived signal. But if the derivation calculation is expensive, you should create a memo.

But there doesn't seem to be a similarly easy to use derive! macro. Also, given that many custom components and component libraries take #[prop(into)] value: RwSignal<T> it would be nice to have a rw_slice! macro as well instead of having to call unite (and there's no From impl for (ReadSignal<T, S>, WriteSignal<T, S>) either)

Describe the solution you'd like

derive! and rw_slice! functional macros similar to memo! and slice!

Describe alternatives you've considered

I'd write these for my own use, but given they are function macros, I'd need a separate crate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions