Skip to content

Instantly share code, notes, and snippets.

View metehansenol's full-sized avatar

Metehan Senol metehansenol

View GitHub Profile
@metehansenol
metehansenol / app.js
Created May 10, 2020 19:13
Todo List with ReactJS
import React from 'react';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
items: [],
title: '',
selectedItemId: null
@metehansenol
metehansenol / GetCustomerAccountBalance.js
Created November 12, 2019 22:12
Getting Customer Account Balance
async componentDidUpdate(prevProps, prevState) {
const accountCode = this.props.accountCode;
if (accountCode !== prevProps.accountCode) {
let header = await Auth.header();
const data = await fetch(`${global.bpmApiUrl}/logo-tedarikciler?cariHesapKodu=${accountCode}`, {headers: header})
.then(response => response.json());
if (data.length > 0) {
@metehansenol
metehansenol / ReactNativeFlatListInMemorySearch.js
Last active February 10, 2024 22:08
In Memory search implementation with React Native FlatList and SearchBar
import React, {Component} from 'react';
import {StyleSheet, View, FlatList} from 'react-native';
import {SearchBar} from 'react-native-elements';
import ListItem from '../components/ListItem';
import Config from "../Config";
export default class DemandListScreen extends Component {
constructor(props) {
@metehansenol
metehansenol / items.js
Created April 25, 2019 15:22
Todo items routes
const express = require('express');
const router = express.Router();
const data = [
{id: 1, title: 'Finalize project', order: 1, completed: false, createdOn: new Date()},
{id: 2, title: 'Book ticket to London', order: 2, completed: false, createdOn: new Date()},
{id: 3, title: 'Finish last article', order: 3, completed: false, createdOn: new Date()},
{id: 4, title: 'Get a new t-shirt', order: 4, completed: false, createdOn: new Date()},
{id: 5, title: 'Create dinner reservation', order: 5, completed: false, createdOn: new Date()},
];