Skip to content

Use it for variable composition function. #144

@ghost

Description

I saw this: #64

but I think we miss something like this:

render() {
  const style = "some css class" + responsive((matches) => return matches ? "mobile" : "desktop");
}

Is there a way?

I tried with https://github.com/contra/react-responsive#rendering-with-a-child-function but it forces me to use if else and repeat the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions