callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.49k stars 2.05k forks source link

IconButton crashes due to missing dependency on `react-native-vector-icons` #4443

Open T1t4m1un opened 5 days ago

T1t4m1un commented 5 days ago

React Native Paper Version: 5.12.3 latest React Native Version: 0.74.2 latest Platform: Android

When using IconButton, the app crashes due to a missing dependency on react-native-vector-icons: image

Reproduce:

This problem has an overflow effect on components that use IconButton. I discovered the problem when using SearchBar.

seb-zabielski commented 4 days ago

Hey, Installing react-native-vector-icons is one of the requirements. You can find more details in the documentation: https://callstack.github.io/react-native-paper/docs/guides/getting-started/

jcubic commented 4 days ago

@seb-zabielski if it's required, then why it's not a dependency? It would simplify the installation.

seb-zabielski commented 3 days ago

@jcubic I took the advice on your question, and here is the answer I got:

autolinking doesn’t work (yet) with transitive dependencies, so even though it would be a dependency of paper, a user would still need to install it as their dep – causing potential version mismatches as well

Here you also have link to related discussion: https://github.com/react-native-community/cli/issues/870