Tag: real world application

Hopefully this article helps you avoid the troubles I’ve gone through.Finding the Best PackageThe trouble was mostly finding the best package with good documentation to follow through so that I can get my Google Maps on my page and going.

The package I found best was google-map-react by istarkov.Google Map Example ProjectWhat was really nice of him to also do was to also create React.Js example project implementing google-map-react this way you can have real world application to see examples of.Quick StartHe does a pretty good job getting you quick started…

However, after going through webpack’s docs and code, there didn’t seem to be an easy way to disable that with a single switch.

I opened an issue here and after some discussion with webpack’s Tobias Koppers, we settled on allowing webpack’s node option to accept a false config.With NodeSourcePlugin disabled, our code that depend on it all failed and I was able to pinpoint among our hundreds of components, which one to look into.I found out that a few components that have server side only behavior implemented it through the runtime flag provided by exenv, like this:import { canUseDOM } from “exenv”function foo() { if (!

canUseDOM) { const crypto = require(“crypto”) // do something with crypto }}The idea is simple, if code is not executing on the browser, then do something on the server side only using the crypto module.

Unfortunately, webpack only does static analysis to find out what code needs to be bundled.

That means NodeJS crypto is included even though it’s only needed for server side.

@OpenCoconut: “4 things for #efficient #Redux, good input by @iJaniashvili 🏆 🎖 #reactjs #webdevelopment”
I’ll try to be brief and tell you things I’ve learned with a Redux journey working on a real world application.
4 things for efficient Redux — SPACELAB TEAM