You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was setting the back button component, I couldn't just pass in an Icon component, the proptype is expecting a function and not an object. I had to create a new component that returns the Icon and pass it in.
Should we change this?
The text was updated successfully, but these errors were encountered:
As the name of the prop says, it expects a component, which is a function and not an object. I don't see why we should change the usecase for this specific property, as it is semantically correct.
If you'd like to introduce a new prop for defining an icon, you're welcome to do that, but generically supporting icons is a slippery slope in my opinion, because there are quite a few ways of doing that. For instance in my project I use custom fonts for icons. But I've also used image sprites before.
The implementations may vary vastly, and it's difficult to find a general solution, so I think it might be wise to leave it to the implementor to quickly write a dumb component to display an icon.
When I was setting the back button component, I couldn't just pass in an Icon component, the proptype is expecting a function and not an object. I had to create a new component that returns the Icon and pass it in.
Should we change this?
The text was updated successfully, but these errors were encountered: