Skip to content

Instantly share code, notes, and snippets.

@nojaja
nojaja / html-reactcomponent-2.markdown
Created June 12, 2017 00:07
Html→ReactComponent #2
@nojaja
nojaja / index.html
Last active June 12, 2017 14:41
コード整形のルール
<div>hofe</div>
<div>
<div>hofe</div>
</div>
<div>hofe
<div>hofe</div>
</div>
<div>
<p>hofe</p>
</div>
@nojaja
nojaja / index.html
Created June 13, 2017 10:31
react-router v4
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.12.0/css/uikit.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.0.0.js"></script>
@nojaja
nojaja / index.html
Last active June 19, 2017 15:33
Monaco-Editor component
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Frontpage layout example - UIkit documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.12.0/css/uikit.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.0.0.js"></script>
@nojaja
nojaja / index.html
Created June 18, 2017 08:19
React-Handsontable component
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Frontpage layout example - UIkit documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.12.0/css/uikit.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-migrate-3.0.0.js"></script>
@nojaja
nojaja / .siteeditor
Last active May 23, 2020 06:38
a gist for a user with token api call via ajax
HelloWorld

React: 保守しやすいハイパフォーマンスの UI コンポーネントを作成する https://www.ibm.com/developerworks/jp/web/library/wa-react-intro/index.html

props としての関数と React の SyntheticEvent

要素の属性は、単純なデータ型ではなくコールバック関数でパラメーター化されることがよくあります。例として、皆さんは HTML の <button> 要素の onClick 属性を設定した経験があることでしょう。それと同じ手法を、React コンポーネントにも適用することができます。2 番目のサンプル・コード (example2.jsx) では、カスタム <MyButton> React コンポーネントがそのプロパティーの 1 つとして、onClick ハンドラー・コールバックを取ります.

var MyButton = React.createClass({
 _buttonClicked: function(e) {
@nojaja
nojaja / .siteeditor
Last active May 23, 2020 06:26
Frontpage layout example
HelloWorld
@nojaja
nojaja / .siteeditor
Last active May 23, 2020 06:25
new project
HelloWorld