istarkov / google-map-clustering-example

clustering example for google-map-react
http://istarkov.github.io/google-map-clustering-example/
200 stars 76 forks source link

Markers/Clusters not showing up in example code #1

Closed jabidof closed 8 years ago

jabidof commented 8 years ago

Hello, First of all thanks for this nice example. I'm willing to test it and I cloned the repo. Everything is bundling fine (svg, sass, etc.). I used latest versions of Recompose and adapted the Recompose functions to fit current version. No Markers or Clusters are rendered.

I uninstall Recompose current version and installed the "recompose": "^0.14.5". In this case, the Markers or Clusters are rendered.

Do you have any idea why current Recompose version is not compatible with your code?

Let me know if I can support you in adapting this example.

J.

istarkov commented 8 years ago

As a collaborator of recompose library I know why it does not work with latest recompose versions. Because since that time recompose changed a lot. It's just a code example, to make it work on newes recompose versions please read recompose and it's changelog.

jabidof commented 8 years ago

Thanks! I will and do my best :-)

Just for info, I did the changes for the "withHandlers" as stated in the release 0.17. I could manage to have it working fine but this didn't render any Markers more.

jabidof commented 8 years ago

Hi, Actually till Recompose version 0.15.0 all works then version 0.15.1 stops working. Can you maybe just point me where the problem could come from? Best.

istarkov commented 8 years ago

mapPropsOnChange has gone, now has the different name and logic withPropsOnChange withAttachedProps has gone also, and now has the different name and signature - withHandlers

jabidof commented 8 years ago

Actually i have done these changes already in last days and before posting (I was raised at the RTFM school ;-) ) but it doesn't solve the problem. Then only I noticed that the example needed 0.14.5. Furthermore, according to the Release notes, there are no particular changes between 0.15.0 and 0.15.1. The naming changed only for later revisions. I think there is another issue there. Any idea?

istarkov commented 8 years ago

Please have a look https://github.com/istarkov/google-map-clustering-example/pull/2 should work.

I'll merge it in a few minutes.

jabidof commented 8 years ago

The problems is in here. These 2 have been inverted between the 2 versions... Maybe this can help.

+        ...omit(this.props, depdendentPropKeys),
+        ...this.computedProps

diff -ENwbur recompose-0.15.0/src/packages/recompose/mapPropsOnChange.js recompose-0.15.1/src/packages/recompose/mapPropsOnChange.js --- recompose-0.15.0/src/packages/recompose/mapPropsOnChange.js 2016-02-04 20:51:06.000000000 +0100 +++ recompose-0.15.1/src/packages/recompose/mapPropsOnChange.js 2016-03-21 21:57:33.000000000 +0100 @@ -22,8 +22,8 @@


     render() {
       return createElement(BaseComponent, {
-        ...this.computedProps,
-        ...omit(this.props, depdendentPropKeys)
+        ...omit(this.props, depdendentPropKeys),
+        ...this.computedProps
       })
     }
   }
istarkov commented 8 years ago

Now master branch has the latest versions of deps.

jabidof commented 8 years ago

Just back on the code. All OK! Many thanks for the master branch.