Skip to content

Documentation and Example have different argument order #92

Description

@joeframbach

The example in the README shows (selector, content, attributes).

h('h1.classy', 'h', { style: {'background-color': '#22f'} }))

But the API documentation shows (selector, attributes, content).

h (tag, attrs, [text?, Elements?,...])

h('h1.fun', {style: {'font-family': 'Comic Sans MS'}}, 'Happy Birthday!')

It was very confusing for me to read the example and figure out what it means, it was not obvious that h was the text content and not some h tagName.

The interactive demo shows that any argument order works, but I think you should standardize on (selector, attributes, content).

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

      Issue actions