This file contains hidden or 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
| class TodoItemsController < ApplicationController | |
| before_action :set_todo_list | |
| before_action :set_todo_item, except: [:create] | |
| def create | |
| @todo_item = @todo_list.todo_items.create(todo_item_params) | |
| redirect_to @todo_list | |
| end | |
| def destroy |
This file contains hidden or 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 React from 'react'; | |
| class Contacts extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| render() { | |
| return ( | |
| <div></div> | |
| ); |
This file contains hidden or 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 React from 'react'; | |
| const Contacts = React.createClass({ | |
| propTypes: { | |
| }, | |
| getDefaultProps() { | |
| return { | |
| }; |
This file contains hidden or 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 React from 'react'; | |
| var SomeMixin = { | |
| doSomething() { | |
| } | |
| }; | |
| const Contacts = React.createClass({ | |
| mixins: [SomeMixin], | |
| handleClick() { |
This file contains hidden or 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 React from 'react'; | |
| class Contacts extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.handleClick = this.handleClick.bind(this); | |
| } | |
| handleClick() { | |
| console.log(this); // React Component Kendisi | |
| } |
This file contains hidden or 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 React from 'react'; | |
| class Contacts extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| handleClick() { | |
| console.log(this); // React Component’ın kendisi | |
| } | |
| render() { |
This file contains hidden or 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 React from 'react'; | |
| class Contacts extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } | |
| handleClick() { | |
| console.log(this); // null | |
| } | |
| render() { |
This file contains hidden or 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 React from 'react'; | |
| const Contacts = React.createClass({ | |
| handleClick() { | |
| console.log(this); // Buradaki this component’ın kendisidir. | |
| }, | |
| render() { | |
| return ( | |
| <div onClick={this.handleClick}></div> | |
| ); |
This file contains hidden or 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 React from 'react'; | |
| class Contacts extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| }; | |
| } | |
| render() { |
This file contains hidden or 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 React from 'react'; | |
| const Contacts = React.createClass({ | |
| getInitialState () { | |
| return { | |
| }; | |
| }, | |
| render() { | |
| return ( |