Skip to content

Instantly share code, notes, and snippets.

Avatar

Anita Czapla heron2014

View GitHub Profile
@heron2014
heron2014 / hapi-boom-json-api.js
Created Jul 22, 2016
hapi plugin to reformat boom errors to json-api
View hapi-boom-json-api.js
exports.register = function (plugin, options, done) {
plugin.ext('onPreResponse', function (request, reply) {
var response = request.response;
if (response.isBoom) {
var error = {
title: response.output.payload.error,
status: response.output.statusCode,
detail: response.output.payload.message
View react-lifecycle-parent-child.jsx
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@heron2014
heron2014 / getAllInheritedPropNames.js
Created Dec 7, 2016
Getting all inherited property names of an object
View getAllInheritedPropNames.js
const getAllInheritedPropNames = (obj) => {
let props = [];
do {
props = props.concat(Object.getOwnPropertyNames(obj));
} while (obj = Object.getPrototypeOf(obj));
return props;
};
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active Apr 6, 2020
Visual instructions how to enable Google Maps on IOS using react-native-maps
View react-native-maps-enable-google-maps-instructions.md

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

You can’t perform that action at this time.