(This is gonna be a short one)

At Gamezop, we recently started writing part of our app redesign in React Native. One of the first challenges that came up was:

How to write our styles efficiently React (Native)?

The Problem

Our app uses a custom font through most of the views we have. So for each Text component that we rendered we had to write some style rules, such as

//HelloTitle.jsconst HelloTitle = ({ title }) => (
<Text style={styles.title}>Hello { title }</Text>
const styles = StyleSheet.create({
title: {
...Platform.select({ …

“There won’t be any winning tonight.” — JavaScript

Saving & restoring objects in JavaScript seems trivial right?

const save    = obj => JSON.stringify(obj)
const restore = str => JSON.parse(str)

Shantanu Raj

Functional Programming fanatic; and yeah also a Fullstack Engineer at https://gamezop.co

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store