From 90fb2c3c172bde4c790a701b77487636a19a1bdb Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Tue, 6 Jun 2017 19:53:12 -0400 Subject: [PATCH] Update comment about RR and RNWeb name conflict --- src/types/reactRouter.re | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/types/reactRouter.re b/src/types/reactRouter.re index 5467f6d..befc490 100644 --- a/src/types/reactRouter.re +++ b/src/types/reactRouter.re @@ -1,6 +1,6 @@ external browserRouter : ReactRe.reactClass = "BrowserRouter" [@@bs.module "react-router-dom"]; -external sswitch : ReactRe.reactClass = "Switch" [@@bs.module "react-router-dom"]; +external _switch : ReactRe.reactClass = "Switch" [@@bs.module "react-router-dom"]; external navLink : ReactRe.reactClass = "NavLink" [@@bs.module "react-router-dom"]; @@ -32,6 +32,11 @@ module BrowserRouter = { let createElement = ReactRe.wrapPropsShamelessly browserRouter (Js.Obj.empty ()); }; + +/** + * The word `Switch` conflicts with React Native Web here. So we are going to import + * RR4's as + */ module RRSwitch = { - let createElement = ReactRe.wrapPropsShamelessly sswitch (Js.Obj.empty ()); + let createElement = ReactRe.wrapPropsShamelessly _switch (Js.Obj.empty ()); };