diff --git a/docs/0.8-upgrade.md b/docs/0.8-upgrade.md index c1f1318..e24acde 100644 --- a/docs/0.8-upgrade.md +++ b/docs/0.8-upgrade.md @@ -9,39 +9,6 @@ Using Reagent itself with Cljsjs packages doesn't require changes, other than making sure you depend on the latest Cljsjs React packages, if you have direct dependencies to them. -If you use additional React packages, you need to update Cljsjs packages -for these to use new React foreign-lib name, `react` instead of `cljsjs.react`. -**Subject to change, if this can be solved easily.** -As a quick fix, you can add updated foreign-lib definition to your project, -like following example for react-leaflet, and update your project -to refer to the new name, and at the same time your can start using -`:global-exports`: - -```cljs -:foreign-libs [{:file "cljsjs/development/react-leaflet.inc.js" - :file-min "cljsjs/production/react-leaflet.min.inc.js" - :provides ["react-leaflet"] - :requires ["react" "cljsjs.leaflet"] - :global-exports {react-leaflet ReactLeaflet}}]}} -``` - -(Note: This still uses the old name for Leaflet, but you can also -update Leaflet foreign-lib to use new name and `:global-exports`.) - -Old code: -```cljs -(ns ... (:require cljsjs.react-leaflet)) - -(def Map (r/adapt-react-class js/ReactLeaflet.Map)) -``` - -New code: -```cljs -(ns ... (:require [react-leaflet :as react-leaflet])) - -(def Map (r/adapt-react-class react-leaflet/Map)) -``` - ## Browser - node modules You can use `:npm-deps` and `:install-deps` compiler options to