Skip to content

Instantly share code, notes, and snippets.

View mariodev12's full-sized avatar

Mario mariodev12

View GitHub Profile
export default class App extends Component {
constructor(){
super()
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2})
this.state = {
dataSource: ds.cloneWithRows([]),
rawData: ''
}
}
@mariodev12
mariodev12 / App.js
Last active February 10, 2017 15:29
import React, {Component} from 'react'
import { Text, InputText, View, StyleSheet, Dimensions } from 'react-native'
const {width, height} = Dimensions.get('window')
export default class App extends Component {
render(){
<View style={styles.container}>
<InputText
style={styles.inputText}
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
@mariodev12
mariodev12 / README-Template.md
Created February 5, 2017 21:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mariodev12
mariodev12 / index.ios.js
Created February 4, 2017 00:08
React Native - Parte 3 - Props y State
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Button
} from 'react-native';
export class ChildComponent extends Component {
// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
}
// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
import React, {Component} from 'react';
class HeartButton extends Component {
constructor(props) {
super(props);
this.state = {active: false};
}
handleClick(){
this.setState({
active: !this.state.active
import React, {Component} from 'react'
class Star extends Component {
render(){
var s = 'fa fa-star';
if(!this.props.selected){
s+='-o'
}
return (
<i {...this.props} className={s}></i>
@mariodev12
mariodev12 / SassMeister-input-HTML.html
Created November 18, 2014 08:25
Generated by SassMeister.com.
<div>
<div class="blur">
<img src="https://serienfurecidos.files.wordpress.com/2014/10/arrow-season-3-poster-2.jpg"/>
<div class="title">
<span>Arrow: The Flash and Oliver Queen.</span>
</div>
</div>
</div>