Skip to content

Commit

Permalink
Update comment about RR and RNWeb <Switch /> name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Jun 6, 2017
1 parent 2ad44ca commit 90fb2c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/types/reactRouter.re
Original file line number Diff line number Diff line change
@@ -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"];

Expand Down Expand Up @@ -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 <Switch /> as <RRSwitch />
*/
module RRSwitch = {
let createElement = ReactRe.wrapPropsShamelessly sswitch (Js.Obj.empty ());
let createElement = ReactRe.wrapPropsShamelessly _switch (Js.Obj.empty ());
};

0 comments on commit 90fb2c3

Please sign in to comment.