[mapguide-users] MapGuide React
Jackie Ng
jumpinjackie at gmail.com
Wed Oct 17 05:11:55 PDT 2018
Hey, sometimes just spelling out the problem into the ether will make the
solution reveal itself in due course. This tried and true method even has
its own name:
https://en.wikipedia.org/wiki/Rubber_duck_debugging
Anyways, regarding custom reducers, have you checked out this sample repo?
https://github.com/jumpinjackie/mapguide-react-layout-example
If you want to do this in a non-disruptive manner (ie. Not having to modify
and maintain your own fork of mapguide-react-layout) then the way to do it
is to create your own custom viewer bundle via the npm module and sub-class
the ApplicationViewModel and exporting that out to the MapGuide namespace as
MapGuide.Application instead of exporting the default ApplicationViewModel.
In your sub-classed ApplicationViewModel you can override getExtraReducers()
to add extra custom branches of application state as demonstrated here:
https://github.com/jumpinjackie/mapguide-react-layout-example/blob/master/src/app.tsx
- Jackie
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
More information about the mapguide-users
mailing list