Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Array.map to a styled element causes an error without a key or id in Hyperapp #64

@Koire

Description

@Koire

I'm using hyperapp and picostyle
When I have more than one element from picostyle on a page without an ID or KEY I receive this error:
index.js:121 Uncaught TypeError: node.setAttribute is not a function
at patchProperty (index.js:121)
at createNode (index.js:135)
at createNode (index.js:140)
at createNode (index.js:140)
at patch (index.js:165)
at patch (index.js:317)
at patch (index.js:282)
at render (index.js:465)

This is how I defined the element:
const ps = picostyle(h);
const GridRow = ps("div")({
display: "grid",
gridTemplateColumns: "repeat(11, 40px)"
})

and in hyperapp:

const RootPage = state => (


{state.rows.map( it => ({it}))}

)

if I add an id or key to the GridRow i.e. it works with no error.

is this a problem with Hyperapp or Picostyle?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions