Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

event onChange does not map to on_change when attaching to ruby component #259

Open
@catmando

Description

@catmando

if you say for example: MyRubyComponent().on(:change) then MyRubyComponent will receive a onChange param. But if you say MyRubyComponent().on(:foo_bar) then MyRubyComponent will receive a on_foo_bar param.

See

def merge_event_prop!(event_name, &block)

For why.

The reason this is done is that MyRubyComponent can pass all_other_params on to components nested within it, and the event names will follow along.

Perhaps rethinking the entire param interface between ruby and native components could yield a more consistent solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @catmando

        Issue actions

          event `onChange` does not map to `on_change` when attaching to ruby component · Issue #259 · ruby-hyperloop/hyper-react