Skip to content

Instantly share code, notes, and snippets.

View SivanKarthick's full-sized avatar
💭
React JS Developer

Karthick Sivan SivanKarthick

💭
React JS Developer
  • Hinduja Tech
  • Chennai
View GitHub Profile
@SivanKarthick
SivanKarthick / ParentChild.es6
Created July 19, 2019 15:13 — forked from sebkouba/ParentChild.es6
Basic example to pass values between parent and child components in React.
/**
* Basic example to pass values between parent and child components in React
* Seems to be in line with this
* http://stackoverflow.com/questions/24147331/react-the-right-way-to-pass-form-element-state-to-sibling-parent-elements
* Now I have the state in parent and child. Is that good or bad? Why would I need it in child?
* Could probably take that out
* */
class Parent extends React.Component {
constructor(props) {
super(props);
@SivanKarthick
SivanKarthick / index.html
Created July 19, 2019 13:20
React Hello World w/ JSBin // source https://jsbin.com/tipixiy
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-0.13.1.js"></script>
<meta charset="utf-8">
<title>React Hello World w/ JSBin</title>
</head>
<body>
<div id="react_example"></div>
<script id="jsbin-javascript">