Skip to content

Instantly share code, notes, and snippets.

Avatar

Furkan Çelik furkancelik

View GitHub Profile
@furkancelik
furkancelik / index.js
Created Apr 9, 2020
dataloader-test-1
View index.js
const users = require("./users");
const posts = require("./posts");
module.exports = {
users,
posts: posts(),
};
@furkancelik
furkancelik / app1.js
Created Jan 29, 2019
React Hooks Form Example
View app1.js
import React, { useState } from "react";
function useInput(initialValue) {
const [value, setValue] = useState(initialValue);
function handleChange(e) {
setValue(e.target.value);
}
return {
value,
onChange: handleChange
@furkancelik
furkancelik / ListItem.js
Last active Jan 28, 2019
React Native Animation Menu
View ListItem.js
import React, { Component } from "react";
import { Dimensions, Animated, Text, View } from "react-native";
const { height, width } = Dimensions.get("window");
export default class ListItem extends Component {
constructor(props) {
super(props);
this.show = new Animated.Value(0);
}
componentDidMount() {
View List
/* @flow */
import React, { PureComponent } from 'react';
import { TouchableHighlight, Image, Dimensions } from 'react-native';
const { width }: { width: number } = Dimensions.get('window');
type node = { node: { image: { uri: string } } };
type State = {};
type Props = {
item: node,
View page
/* @flow */
import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
View,
Text,
StatusBar,
ScrollView,
Dimensions,
View picker.js
import React, { Component } from 'react';
import {
TouchableHighlight,
TouchableOpacity,
Image,
ImageBackground,
View,
Text,
StatusBar,
ScrollView,
View index.js
var WebSocketServer = require('ws').Server
, wss = new WebSocketServer({ port: 8083 });
wss.on('connection', function connection(ws) {
ws.on('message', function incoming(message) {
console.log('received: %s', message);
// ws.send("message");
ws.send(message);
});