Skip to main content

Posts

Showing posts from April, 2017

React Native & Windows 10: "EPERM: operation not permitted, lstat"

I'm working on the Android version of a React Native (v0.43.4) app on my Windows 10 machine, which has turned out to be a real pain compared to working on the iOS version on my Mac. I've got everything set up with Android Studio, platform tools, the Android emulator and so on. Running my app in the emulator also works, but almost every single time I issue the react-native run-android command, it fails with the following error from the React Packager: EPERM: operation not permitted, lstat <some_path_here> I have no idea what this problem is or why it happens. I don't even have to make any changes to the code or included libraries for it to appear. It's enough to just stop the React Packager and run react-native run-android again to get the error. It's really starting to get on my nerves since rebuilding seems to be required a lot more often on Windows than what I'm used to on OS X. I'd love to know what causes this, but until I manage to figure

ReactNative + Redux component pattern

React Native together with Redux is a great combination of technologies for building a cross-platform mobile application. If you haven't worked with React, Redux (or similar frameworks) there will definitely be a steep learning curve to understand the key concepts and how everything works. But once you get the hang of it, you'll find yourself creating new components in no time, with code that feels very stable and maintainable. The fact that React Native and Redux are completely independent of each other gives you a lot of flexibility when it comes to how to use them in your app. This is of course mostly a very good thing, but it can also be a bit confusing at times. One of the things that took me quite some time to figure out was how to best construct my components, when I should use Redux container components, what should be injected from the container components to the presentational components and so on. If you don't decide how to solve things like these early on in