scalajs-react icon indicating copy to clipboard operation
scalajs-react copied to clipboard

ScalaFnComponent doesn't include displayName

Open nafg opened this issue 2 years ago • 1 comments

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"))
  }

nafg avatar Oct 24 '23 03:10 nafg

Sorry I forgot about #1065 and created a new issue

nafg avatar Oct 24 '23 03:10 nafg