Skip to content

Instantly share code, notes, and snippets.

View ronal2do's full-sized avatar

Ronaldo Lima ronal2do

View GitHub Profile
import paramsToProps from 'paramsToProps.js'
const MainNavigator = StackNavigator({
firstScreen: { screen: paramsToProps(FirstScreenComponent) },
secondScreen: { screen: paramsToProps(SecondScreenComponent) },
});
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.0.0'
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> A problem occurred configuring project ':react-native-background-geolocation'.
> Could not resolve all dependencies for configuration ':react-native-background-geolocation:_debugPublishCopy'.
> Could not resolve com.github.tony19:logback-android-core:1.1.1-6.
Required by:
project :react-native-background-geolocation
@ronal2do
ronal2do / CircleAnimation.js
Created October 11, 2017 03:55 — forked from mmazzarolo/CircleAnimation.js
Super simple circle animation overlay for React-Native
/* @flow */
import React, { Component } from 'react'
import { View } from 'react-native-animatable'
import metrics from 'src/config/metrics'
type Props = {
isVisible: boolean,
backgroundColor: string,
animationTiming?: boolean
}
<!-- smartlook -->
<script type="text/javascript">
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://rec.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', '4574902c33bd6e243dd32e4d1f5ba5f9f64a2727');
</script>
<!-- Crisp -->
@ronal2do
ronal2do / app.js
Last active August 31, 2017 14:48
// Esse código completo você pode encontrar no repositório
// https://github.com/ronal2do/RNRelayModern/blob/master/src/App.js
import { QueryRenderer, graphql } from 'react-relay';
import environment from '../createRelayEnvironment';
// importamos o environment
====
// aqui criamos uma abstração da query
const query = graphql`
query AppQuery {
/**
* @flow
*/
import {
Environment,
Network,
RecordSource,
Store,
} from 'relay-runtime';
@ronal2do
ronal2do / getSchema.js
Last active August 31, 2017 13:29
getSchema.js
var fetch = require('node-fetch');
var fs = require('fs');
const {
buildClientSchema,
introspectionQuery,
printSchema,
} = require('graphql/utilities');
fetch('http://localhost:5000/graphql', {
@ronal2do
ronal2do / NetInfo.js
Created August 20, 2017 20:13 — forked from sibelius/NetInfo.js
Tiny component that shows an alert bar when there is no internet connection
import React, { Component } from 'react';
import {
View,
Text,
TouchableHighlight,
NetInfo,
} from 'react-native';
export default class ConnectionInfo extends Component {
state = {