Skip to content

Instantly share code, notes, and snippets.

View pjhjohn's full-sized avatar
☁️
Cloud

JoonHo Park pjhjohn

☁️
Cloud
View GitHub Profile
@pjhjohn
pjhjohn / MainActivity.java
Created January 6, 2017 06:52
Minimal Permission Example
package ly.soundl.test.batterytester;
import android.Manifest;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Handler;
/* 1. Using this.props.children */
// containers/Post.js
<PostDetail key={this.props.post.id} {...this.props.post} >
{this.props.comments.map((comment) => <Comment key={comment.id} {...comment} />)}
</PostDetail>
// components/PostDetail.js
<div>
{this.props.children}
<div/>
/* 2. transfer using props */