Skip to content

Instantly share code, notes, and snippets.

@valex
valex / index.html
Created October 22, 2018 13:34
Table simple search
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->
@valex
valex / index.html
Created October 22, 2018 12:33
Table editing
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->
@valex
valex / index.html
Created October 22, 2018 11:10
Table sorting. bind 'this' to event handler and map function
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->
@valex
valex / index.html
Created October 21, 2018 20:53
React. Display simple table
<!DOCTYPE html>
<html>
<head>
<title>Table</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="03.00.table.css">
</head>
<body>
<div id="app">
<!-- my app renders here -->
@valex
valex / index.html
Created October 21, 2018 16:50
React.PureComponent
<!DOCTYPE html>
<html>
<head>
<title>Lifecycle (with mixin)</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
</head>
@valex
valex / index.html
Created October 21, 2018 16:42
shouldComponentUpdate
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lifecycle</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
@valex
valex / index.html
Created October 21, 2018 14:42
Using child components + componentWillUnmount
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lifecycle</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
@valex
valex / index.html
Created October 21, 2018 12:07
Component lifecycle reset update (set state to old state)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lifecycle reset</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
@valex
valex / index.html
Created October 21, 2018 11:51
Component lifecycle method
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lifecycle</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
@valex
valex / index.html
Created October 20, 2018 20:06
Change props outside component (getDerivedStateFromProps)
<!DOCTYPE html>
<html>
<head>
<title>State</title>
<style>
body, textarea {
font-family: Courier;
}
</style>
</head>