scalajs-react
scalajs-react copied to clipboard
ScalaFnComponent doesn't include displayName
Here is my "userland" solution:
implicit class withDisplayName[P, CT[-p, +u] <: CtorType[p, u]](self: ScalaFnComponent[P, CT]) {
def withDisplayName(name: String) = {
self.raw.asInstanceOf[js.Dynamic].displayName = name
self
}
def withDisplayName(implicit name: FullName): ScalaFnComponent[P, CT] =
withDisplayName(name.value.stripSuffix(".component"))
}
Sorry I forgot about #1065 and created a new issue