Skip to content

Instantly share code, notes, and snippets.

View smhatre59's full-sized avatar

Saurabh Mhatre smhatre59

View GitHub Profile
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
@smhatre59
smhatre59 / gist:b17498ed1be66a4b104d1379c66b6144
Created October 29, 2016 17:05
react native recycler view
include ':ReactNativeRecyclerListview'
project(':ReactNativeRecyclerListview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-recycler-listview/android')
@smhatre59
smhatre59 / gist:2fb2e07c7caa9800e6ec0d104d7991e7
Created October 29, 2016 17:07
React native recycler view
dependencies {
compile project(':ReactNativeRecyclerListview')
}
import com.customlistview.ListViewPackage;
@Override protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ListViewPackage()
);
}
import ListViewCustom from 'react-native-recycler-listview';
constructor(props) {
super(props);
var array = [];
for(var i = 0; i < 1000; i++){
array.push({"title":"Title","subtitle":"subtiles"});
}
this.state = {
dataSource:{"names": array}
"dependencies": {
"axios": "^0.15.2",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-react-html-attrs": "^2.0.0",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-polyfill": "^6.9.1",
"babel-preset-es2015": "^6.14.0",
import React from "react";
import ReactDOM from "react-dom";
//components
import MainComponent from "./components/App.js";
ReactDOM.render(<MainComponent />
,document.getElementById("main"));
import React from "react";
import ReactDOM from "react-dom"
import UserList from './UserList.js'
export default class Main extends React.Component{
render(){
return (
<div>
<UserList />
</div>
import React from "react";
import ReactDOM from "react-dom"
export default class Userlist extends React.Component{
render(){
return (
<div>
UserList Component
</div>
)
import React from "react";
import ReactDOM from "react-dom";
import {Provider} from "react-redux";
//components
import AppComponent from "./components/App.js";
import store from "./store";
ReactDOM.render(<Provider store={store}>
<AppComponent />
</Provider>,document.getElementById("main"));