GithubHelp home page GithubHelp logo

react-html-attributes's People

Contributors

dylanpyle avatar f-f avatar gragland avatar jackyho112 avatar justinwoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-html-attributes's Issues

onClick

Hi,

thanks for the great package! It saved me a lot of trouble.

I was wondering if there's a reason why onClick is only considered valid for a tags?

Util fn to map attr to React equivalent

I am writing a parser that builds a React component tree from an HTML string. I have slowly been adding to a map of html attribute names to their React counterparts. It would be nice not to have to do this manually, and I stumbled across this library which gives us all the React attribute names, but not what their "native" names are.

Would a utility function that maps an attribute name to its React equivalent be something that you would be interested in adding to this library?

e.g.

toReactAttribute('allowfullscreen')
//=> 'allowFullScreen'

Cheers

Please can we have a new release, and on npm?

It seems that npm has a version 1.4.3 of this package, and it's unclear what that actually is.

Perhaps we could have a new release (>1.4.3) both here and on npm? I am interested in recent additions, e.g. onFocus, onKeyDown, etc, which are not yet available in the released package.

`html-element-attributes` listed as both peer and regular dependency

html-element-attributes is currently listed as both a peer and regular dependency in package.json. Is this by design?

{
  "dependencies": {
    "html-element-attributes": "^1.0.0"
  },
  "peerDependencies": {
    "html-element-attributes": "^1.0.0"
  },
}

The presence of the peer dependency is currently causing issues with the installation of paypal/glamorous. On npm 2, it leads to an extraneous dependency error and similarly can lead to a missing peer dependency error.

Would it make sense to remove the peer dependency?

Unnecessary test?

Thanks for the work you put into creating this project.

I was looking at the tests files and noticed one test checking if the array is alphabetically sorted. (see here).

Looking at the regex test we have, it looks like it's only checking that the first letter of the first element in the array is an alphabet character, or -. It makes no assumptions about any of the elements actually being in alphabetical order.

For example,

[
  ['carrot', 'apple', 'banana'],
  ['apple', 'carrot', 'banana'],
  ['banana', 'apple', 'carrot'],
]
// would pass your test

Even if the regex test did work, does the ordering of the elements matter?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.