This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ReactBase extends React.Component { | |
| /* event emitting function, for completeness' sake */ | |
| emit(eventName, eventData = {}) { | |
| this.props.dispatch(eventName, eventData); | |
| } | |
| shouldComponentUpdate(nextProps) { | |
| return !_.isEqual(this.props, nextProps); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class App extends React.Component { | |
| static makeProps($) { | |
| return { | |
| box1: $.box1, | |
| box2: $.box2, | |
| otherData: $.otherData || "Default Value" | |
| } | |
| } | |
| render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* App.makeProps */ | |
| static makeProps($) { | |
| return { | |
| /* call Box.makeProps to construct the substate */ | |
| box1: [Box, "1"], | |
| box2: [Box, "2"], | |
| /* call OtherData.makeProps to get the substate */ | |
| OtherData | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package finalizertest; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import android.support.test.runner.AndroidJUnit4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static com.google.common.base.Preconditions.checkNotNull; | |
| import java.util.Set; | |
| import java.util.function.Function; | |
| import com.google.common.collect.ImmutableSet; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default class GeoJsonMapLayer extends React.Component { | |
| render() { | |
| return ( | |
| <div> | |
| </div> | |
| ); | |
| } | |
| componentWillUnmount() { | |
| if (this.layer) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @fileoverview Disallow undeclared variables in JSX | |
| * @author Yannick Croissant | |
| */ | |
| 'use strict'; | |
| /** | |
| * Checks if a node name match the JSX tag convention. | |
| * @param {String} name - Name of the node to check. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## works | |
| create schema core; | |
| create table core.items ( | |
| id serial primary key | |
| ); | |
| create table core.other ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ca.odell.glazedlists.event.ListEvent | |
| import java.util.* | |
| data class ChangeRange(val firstIndex: Int, var count: Int, val type: ChangeType) { | |
| // ~ Delegated -------------------------------------------------------------------------------- | |
| val lastIndex: Int | |
| get() = firstIndex + count - 1 |