Skip to content

How does react map props to dom internally? #11706

@lifeiscontent

Description

@lifeiscontent

Hi, I'm working on a library that proxy's SVG elements so you can mutate the SVG Element when it has loaded.

https://github.com/lifeiscontent/react-svg-injector

I noticed that when I added an onClick prop to my Mutate component it didn't map properly as in javascript the proper syntax is onclick.

Here is where the code I'm working on lives: https://github.com/lifeiscontent/react-svg-injector/blob/master/lib/mutate.js#L17

I'm wondering how ReactDOM does this internally so I can have a consistent API with my library.

any support on this topic is greatly appreciated, thanks!

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

    Issue actions