From af74914f9d5ae1175ff3ea847d648f5360361b58 Mon Sep 17 00:00:00 2001 From: Wira Siwananda Date: Sat, 20 Aug 2016 22:32:22 +0800 Subject: [PATCH] Create section to troubleshoot Native component for 'BlurView' does not exist warning --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 72c557a..83778a2 100644 --- a/README.md +++ b/README.md @@ -122,5 +122,27 @@ It has the following props: - `downsampleFactor` (Number) - `overlayColor` (Color) +#### Troubleshooting +On older instances of react-native, BlurView package does not get added into the MainActivity/MainApplication classes where you would see `Warning: Native component for 'BlurView' does not exist` in RN YellowBox or console. + +To rectify this, you can add the BlurViewPackage manually in MainActivity/MainApplication classes +```java +... +import com.cmcewen.blurview.BlurViewPackage; +... + +public class MainApplication extends Application implements ReactApplication { +... + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), + new BlurViewPackage() + ); + } +... +} +``` + ### Questions? Feel free to contact me in [twitter](https://twitter.com/kureevalexey) or [create an issue](https://github.com/Kureev/react-native-blur/issues/new)