How to use the cloneElement function from preact

Find comprehensive JavaScript preact.cloneElement code examples handpicked from public code repositorys.

84
85
86
87
88
89
90
91
92
93

    if (!cachedChildren) {
      return null
    }

    return cloneElement(cachedChildren, {
      className: classNames(className, cachedChildren.attributes.className)
    })
  }
}
fork icon0
star icon0
watch icon1