javascript
Storybook JS: 'Cannot GET /'
· Reading time: ~1 minute(s) (152 words) programming web javascript storybook reactWhen you run storybook locally, you might encounter the error 'Cannot GET /' when browsing to localhost:6006. (Continue reading)
iOS APNs/APS Environments
· Reading time: ~2 minute(s) (337 words) programming reactnative ios javascriptI wanted to get to a situation where we can point the build in App Center to sandbox, and the build in App Store & TestFlight to production. Sadly, after much investigation and trying things out, I came out with the following conclusion... (Continue reading)
Reduce a large JSON object down to only what you need
· Reading time: ~3 minute(s) (440 words) programming javascript json webSometimes you need to use an API that returns a large payload, but you may only need to use a small number of fields from that payload. Rather than try storing that data, or hand-balling the data yourself, there is an alternative solution. (Continue reading)
Testing Mobile App in AWS Device Farm using Appium and Node
· Reading time: ~7 minute(s) (1364 words) programming javascript react-native aws nodeWarning: this post is quite code heavy as I offer our solution as an example At work, we’ve been working on a mobile app for our customers. We’ve been looking at automated testing to interact with the app like a user would on a device and came across Appium and Detox as potential options that wouldn’t cost too much to run. As we primarily worked on Windows machines, Detox was out of the running as it seems to be only guaranteed support on MacOS, so we started looking at Appium instead. (Continue reading)
Configuring NGINX to work with React Router
· Reading time: ~1 minute(s) (168 words) programming javascript nginx techWhen using the `BrowserRouter` that's provided by React Router, you'll find that if you're navigating within the site to the various URLs, they will work. However if you bookmarked one of those URLs, or refreshed the browser on a URL, it will return a 404. (Continue reading)
How to test a custom React hook component
· Reading time: ~3 minute(s) (624 words) programming javascript react testingAs part of my GameBrowser side-project, I’m at the stage where I wanted to start improving the UI a bit. This included needing to define a way of filtering the servers in the list, because they’re all saved together at the moment. As a first attempt, I opted for a simple Dropdown control and decided to make it generic using a custom React Hook. The result was the creation of useDropdown. (Continue reading)
Basic Setup for React Projects in 2020
· Reading time: ~7 minute(s) (1447 words) programming javascript reactI’ve seen a lot of people using project initialisation tools to create their new React projects over the years, in particular create-react-app. While I do see there are some benefits to these tools (in particular for newcomers), these tools do have their disadvantages. I cloned a repository the other day which was using create-react-app, and an npm i installed over 2000 packages! This is a hell of a lot to download just to be able to run some code locally. (Continue reading)
Convert JavaScript Number to Number Array
· Reading time: ~1 minute(s) (89 words) programming javascriptI had a number which I wanted converting into an array where each digit of the number was an item in the array. I tried a few different ways of doing this but always ended up with a string array which wasn't what I wanted. (Continue reading)