We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When providing a name for a forwardRef, I see "Anonymous" as the display name. This seems to be caused by the extra wrapper function provided here
forwardRef
Feliz/Feliz/Internal.fs
Line 157 in 6841c9b
Shadowing the render function to displayName to be set on the wrapper function sets the name correctly:
displayName
let forwardRefWithName (name: string) (render: ('props * IRefValue<'t> -> ReactElement)) : ('props * IRefValue<'t> -> ReactElement) = let render = System.Func<'props, IRefValue<'t>, ReactElement>(fun props ref -> render (props, ref)) let forwardRefType = Interop.reactApi.forwardRef (render) render?displayName <- name fun (props, ref) -> let propsObj = props |> JsInterop.toPlainJsObj propsObj?ref <- ref Interop.reactApi.createElement (forwardRefType, propsObj)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When providing a name for a
forwardRef
, I see "Anonymous" as the display name. This seems to be caused by the extra wrapper function provided hereFeliz/Feliz/Internal.fs
Line 157 in 6841c9b
Shadowing the render function to
displayName
to be set on the wrapper function sets the name correctly:The text was updated successfully, but these errors were encountered: