Skip to content

Instantly share code, notes, and snippets.

View ebrugulec's full-sized avatar
💃

Ebru Gulec ebrugulec

💃
  • Berlin, Germany
View GitHub Profile
Import week3.Rational
object scratch{
new week3.Rational(1,2)
}
Import week3._
object scratch{
new week3.Rational(1,2)
}
trait Planar {
def height: Int
def width: Int
def surface = height * width
}
object HelloWorld {
def main(args: Array[String]): Unit = {
println("Hello, world!")
}
}
import React from 'react';
const Contacts = React.createClass({
render() {
return (
<div></div>
);
}
});
import React from 'react';
class Contacts extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div></div>
);
import React from 'react';
const Contacts = React.createClass({
getInitialState () {
return {
};
},
render() {
return (
import React from 'react';
class Contacts extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
import React from 'react';
const Contacts = React.createClass({
handleClick() {
console.log(this); // Buradaki this component’ın kendisidir.
},
render() {
return (
<div onClick={this.handleClick}></div>
);
import React from 'react';
class Contacts extends React.Component {
constructor(props) {
super(props);
}
handleClick() {
console.log(this); // null
}
render() {