Author: Chris Lattner
This file contains 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 fs from 'fs'; | |
import path from 'path'; | |
import babel from 'rollup-plugin-babel'; | |
import commonjs from 'rollup-plugin-commonjs'; | |
import nodeResolve from 'rollup-plugin-node-resolve'; | |
import typescript from 'rollup-plugin-typescript'; | |
import replace from 'rollup-plugin-replace'; | |
function findVersion(file, extensions) { | |
for (let e of extensions) { |
@tracked
is a decorator for Preact that makes working with state values no different than properties on your component instance.
It's one 300 byte function that creates a getter/setter alias into state/setState() for a given key, with an optional initial value. The "magic" here is simply that it works as a property decorator rather than a function, so it appears to integrate directly into the language.
tracked
has no dependencies and works with any component implementation that uses this.state
and this.setState()
.
This file contains 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
function increment(props, state) { | |
return { | |
value: state.value + props.step, | |
}; | |
} | |
function decrement(props, state) { | |
return { | |
value: state.value - props.step, | |
}; |
This file contains 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
<script> | |
window.Promise || document.write('<script src="https://unpkg.com/es6-promise@3.2.1/dist/es6-promise.min.js"><\/script>'); | |
window.fetch || document.write('<script src="https://unpkg.com/whatwg-fetch@1.0.0/fetch.js"><\/script>'); | |
</script> |
This file contains 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
var webpack = require('webpack'); | |
var MemoryFS = require('memory-fs'); | |
var SingleEntryDependency = require('webpack/lib/dependencies/SingleEntryDependency'); | |
var fs = new MemoryFS(); | |
fs.mkdirpSync('/src'); | |
fs.writeFileSync('/src/app.js', 'require("./dep.js")', 'utf-8'); | |
fs.writeFileSync('/src/dep.js', 'module.exports = function(msg){console.log(msg)}', 'utf-8'); | |
fs.writeFileSync('/src/extra-entry.js', 'require("./dep.js")', 'utf-8'); |
This file contains 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
// Copyright 2004-present Facebook. All Rights Reserved. | |
#import "RKAsyncRocksDBStorage.h" | |
#include <string> | |
#import <Foundation/Foundation.h> | |
#import <FBReactKit/RCTConvert.h> | |
#import <FBReactKit/RCTLog.h> |
This file contains 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
/** | |
* Copyright (c) 2015-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
*/ | |
#import "AppDelegate.h" |
This file contains 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
<br /><br /> | |
# React Native: Animated | |
ReactEurope 2015, Paris - Spencer Ahrens - Facebook | |
<br /><br /> | |
## Fluid Interactions | |
- People expect smooth, delightful experiences |
NewerOlder