- Modern Syntax
 - OOP + FP
 - Multiplatform
 
Variables & Constants
| import React, {Component} from 'react'; | |
| import {View, StyleSheet} from 'react-native'; | |
| import {Icon, Text} from 'react-native-elements'; | |
| const SectionHeader = (section, index, isActive) => <View style={styles.container}> | |
| <Text h4>{section.title}</Text> | |
| <View style={styles.right}> | |
| <Text style={{ | |
| marginRight: 5, | |
| fontSize: 18 | 
| import React, { Component } from 'react'; | |
| import { SectionList, StyleSheet, Text, View, ScrollView, Animated } from 'react-native'; | |
| import { SearchBar } from 'react-native-elements'; | |
| import { Navigation } from 'react-native-navigation'; | |
| import LCE from '../../../../global/LCE'; | |
| import RoomRowActionButtonList from './RoomRowActionButtonList'; | |
| import RoomCell from './RoomCell'; | |
| import { CHECK_OUT_TYPE, CHECK_IN_TYPE, STAY_OVER, CHECKED_OUT_TYPE, PROFILE_ACTION, EDIT_ACTION, DATES_ACTION, CASHIER_ACTION } from '../../../../global/constants'; | |
| import SectionHeader from './SectionHeader'; | |
| const {SeparatorComponent} = require('../../../../global/components/sectionComponent.js'); | 
| // find max substring | |
| // using dynamic programming | |
| // Time: O(n) | |
| var maxSubString = s => { | |
| if (s.length <=1) return s | |
| let dp = [] // max-len of the substring at index i | |
| var idx=0// mark start index of max substring | |
| dp[0] =1 | |
| for(var i=1; i < s.length; i++){ | 
| fun coinChange(n, coins) | |
| dp=[]// n+1 items | |
| dp[0]=0 | |
| for i from 1 to n | |
| minCoins = maxint | |
| for(coin in coins) | |
| if(i >= coin) | |
| min = Math.min(min, dp[i -coin]+1) | |
| dp[i] = min | 
| // blueprint | |
| open class EpoxyModel { | |
| fun bind() {} | |
| } | |
| class Factory( | |
| val key: Int, | |
| val createModel: (Any) -> EpoxyModel | |
| ) |