HustleTime Development: Intro

As I push forward with new iterations of HustleTime, I wanted to create a blog to detail my progress, perhaps it will foster creativity, engagement with my small (but growing) audience, and / or simply serve to document my progress.

I am only a few days removed from my Android release, a painstakingly difficult process that led me down many dead ends, and eventually rebuilding the app in a completely different code repo.

The draw and selling points of React-Native eventually ended up failing me. Now that I’ve created the app, I can say that there are still a lot of advantages to building in React-Native, but it’s never as simple as it seems.

An example is in NSUserDefaults (Ios) and DefaultPreferences (android):

IOS

import UserDefaults from 'react-native-userdefaults-ios'

.
.

getSavedCenterPoints = () => {
  UserDefaults.arrayForKey('savedCenterPoints')
  .then(array => {
    array != null ? this.setState({savedCenterPoints: array}) : null        
  })
}

Android

import DefaultPreference from 'react-native-default-preference'

.
.

getSavedCenterPoints(){
  DefaultPreference.get('savedCenterPoints')
  .then(string => JSON.parse(string))
  .then(array => {
    array != null ? this.setState({savedCenterPoints: array}) : null        
  })
}

As you can see, the code is very similar, but one library can take an array, and the other forces me to use a string. It’s little things like this, coupled with various dependency issues – particularly how gradle dependency versioning works that really slowed me down.

I hope to blog more about how I improve the product in the future as well as a write a retrospective on my journey in future blog posts.

Thanks for reading!