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
<Provider store={store}> | |
{() => <App/>} | |
</Provider> |
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
export default function(selector, fn){ | |
let dom = document.querySelector(selector) | |
if(dom){ | |
return fn(dom) | |
} | |
} |
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 ExecutionEnvironment from 'react/lib/ExecutionEnvironment' |
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
const FooItem = ({ show }) => { | |
if(!show){ | |
return null | |
} | |
return ( | |
<div>some component</div> | |
) | |
} |
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 a = "hoge" // もう忘れていい | |
let b = "fuga" // 変更できる値。mutable | |
const c = "baz" // 変更できない値。immutable |
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
gulp.task('babel-build', function(){ | |
browserify({ | |
entries: "someFile.js", | |
extensions: ['js', 'jsx'], | |
}) | |
.transform(babelify.configure({ | |
comments: false // これ! | |
})) | |
.pipe(source("bundle.js")) | |
.pipe(gulp.dest("/dest")) |
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
https://cdn.jsdelivr.net/g/jquery@1.11.3,jquery.ui@1.11.4 |
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
// 値は値でreducerに返す | |
export const appendTask = (task) => { | |
return {type: "TODO_ADD", payload: task} | |
} | |
// 別途、エラーがあれば、そちらもactionを生成する | |
export const checkTaskError = (task) => { | |
if(!isValidTodo(task)){ | |
return {type: "ERROR_MESSAGE", payload: "Input Some word"} | |
} |
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
<ul id="list1"> | |
<li>AAAA</li> | |
<li class="active">BBBB</li> | |
<li>CCCC</li> | |
</ul> |
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
X-SourceMap: /path/to/script.js.map |
OlderNewer