Skip to content

Polymorphic components #32

@joelmoss

Description

@joelmoss

A component that can be rendered from Ruby (Phex/ViewComponent), and imported from js (React). Proscenium knows about the importer, so can modify the resulting import accordingly.

For example, the InputComponent...

| /app/components/input
|__ component.rb
|__ react
   |__ component.jsx
import InputComponent from '/app/components/input'

The above will actually import /app/components/input/react/component.jsx.

render Input::Component.new

The above will do as you would expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions