Skip to content
New issue

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

Component name showing up as Anonymous #181

Closed
kerams opened this issue May 4, 2020 · 3 comments · Fixed by #196
Closed

Component name showing up as Anonymous #181

kerams opened this issue May 4, 2020 · 3 comments · Fixed by #196
Labels
bug Something isn't working

Comments

@kerams
Copy link
Contributor

kerams commented May 4, 2020

I've just updated to Fable.React v6 and am using Feliz.React.memo (name * areEqual * render) to create a component. When I check the components in the browser, the name is not propagated. Currently I am unable to use FunctionComponent.Of, so I'm not sure if this is a problem in Feliz or in the new version of Fable.React.

Edit: the names are there when I switch to Feliz.React.functionComponent

@kerams
Copy link
Contributor Author

kerams commented May 5, 2020

This could be a problem in React dev tools facebook/react#18026

@Shmew Shmew changed the title Component name showing up as Anonymouse Component name showing up as Anonymous May 5, 2020
@Shmew Shmew added the bug Something isn't working label May 5, 2020
@Shmew
Copy link
Collaborator

Shmew commented May 5, 2020

Looks like it is related to dev-tools then.

Are you on the current version?

Does downgrading resolve it?

@kerams
Copy link
Contributor Author

kerams commented May 23, 2020

Changing memoElementType?displayName to renderElement?displayName here does:

Feliz/Feliz/React.fs

Lines 43 to 44 in 2a0b934

let memoElementType = Interop.reactApi.memo(renderElement, (defaultArg areEqual (unbox null)))
name |> Option.iter (fun name -> memoElementType?displayName <- name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants