Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Question: Any limitations? #2
That's actually the exact scenario that prompted this work--we were working to port a big Flex app, and settled on React + Redux + TypeScript as a stack.
We've not shipped yet, but are a only a few weeks out at this point; to the best of my knowledge, we haven't run into any real issues. @ryanewtaylor or @cwalv might be willing to chime in here, but I'm pretty confident in it.
I also put together a yeoman generator that uses a similar setup with React, that we've used to build a few components.
Thanks for the message, and if you have any questions, let me know!
Sure, I can chime in.
tl;dr; I love TypeScript, React, and Redux.
Like @lobsteropteryx I am very confident in this stack. Our major hurdles have been learning curve with a team that has varied skills sets and bringing everyone (myself included) up to speed. A proper metaphor might be trying to fly a plane while reading the instruction manual for how to fly it.
We have yet to pin the libs we are using to specific versions as we are in very active development. Some of the tooling is changing at a rapid pace and that can cause issues (we had to pin TypeScript at 1.8.7 for example due to an issue in 1.8.10). That has bit us a little, but there are no showstoppers and the rapid pace is a refreshing change from the complete standstill in the Flex world. Once we get just a little closer to the deadline we'll pin the versions down to their minor versions.
Otherwise, I do feel the stack is production ready.
@dcworldwide hope that helps.
I've spent the day trying to extend your project to include the following:
My changes are in the following fork. Later I'll include React Router and Redux into my fork.
With React, I've been able to successfully create a React app that wraps an Esri js map and have validated that drawing / editing work. My initial solution is to essentially wrap the Esri component in a React component, and mount it to the DOM onComponentDidMount. You can see the source here. Is this the best approach that you guys found?
Getting HMR with webpack has been less fruitful. Did you manage to get it working? Here is what I've found:
When creating a single bundle in UMD format, If I switch from
HMR works in this case when rendering only React components with no Esri dependencies. However I couldn't get HMR working when loading the Esri JS API. Webpack can rebuild the React components on file change, but the Webpack Dev Server doesn't to hot update the bundle.
I'd really like to get your thoughts on this. I'm completely out of ideas atm.
@dcworldwide: I think your map creation is pretty similar to what we're doing;
As far as hot module reloading: We aren't using it. I looked at it early on, and had enough trouble that I just put it aside. Browsersync has been doing everything I want for now.
Good to know. FYI my fork now has HMR working, but it's a little imperfect. I need to add react hot loader to preserve component state. Then I'm confident it will provide a solid user experience.
One thing to note, is that I seem to be able to load all esri js amd modules except for dijit namespace ones.