This file contains 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, {Component} from 'react'; | |
import Tweet from '../component/Tweet'; | |
class Timeline extends Component { | |
render() { | |
return ( | |
<div> | |
<Tweet /> | |
</div> | |
); | |
} |
This file contains 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
const element = <h1>Hello, world!</h1>; |
This file contains 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, { Component } from 'react'; | |
import Tweet from '../component/Tweet'; | |
const tweet = [ | |
{ | |
tweet_id: 1, | |
tweet_topic: "Sports", | |
tweet_detail: "Liverpool, Manchester City ile arasındaki puan farkını 1'e düşürdü." | |
}, | |
{ | |
tweet_id: 2, |
This file contains 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 { Component } from "react"; | |
class Tweet extends Component { | |
render() { | |
return ( | |
<div> | |
{this.props.tweet.map(tweet => | |
<div key={news.tweet_id}> | |
{tweet.tweet_topic} | |
<br /> | |
{tweet.tweet_detail} |
This file contains 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
constructor(props) { | |
super(props); | |
this.state = { | |
categories: | |
[ | |
{categoryId: 1, categoryName: "Sports" }, | |
{categoryId: 2, categoryName: "Economy"} | |
] | |
}; | |
} |
This file contains 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, { Component } from 'react'; | |
import Tweet from '../component/Tweet'; | |
const tweet = [ | |
{ | |
tweet_id: 1, | |
tweet_topic: "Sports", | |
tweet_detail: "Liverpool, Manchester City ile arasındaki puan farkını 1'e düşürdü." | |
}, | |
{ | |
tweet_id: 2, |
This file contains 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 { Component } from "react"; | |
class Tweet extends Component { | |
render() { | |
return ( | |
<div> | |
{this.props.tweet.map(tweet => | |
<div key={tweet.tweet_id}> | |
{tweet.tweet_topic} | |
<br /> | |
{tweet.tweet_detail} |
This file contains 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, { useState } from 'react'; | |
function Example() { | |
// Declare a new state variable, which we'll call "count" | |
const [count, setCount] = useState(0); | |
return ( | |
<div> | |
<p>You clicked {count} times</p> | |
<button onClick={() => setCount(count + 1)}> |
This file contains 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
dev | |
├── build | |
│ └── logs | |
│ │ └── debug_a.log | |
│ │ └── debug_b.log | |
│ │ └── debug_c.log | |
│ | |
├── tests | |
│ └── test1.js | |
│ └── test2.js |
This file contains 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
// Validation For Credit Card Numbers Using Luhn Algorithm | |
const validateCreditCardNumber = (input) => { | |
// Kredi kartı numarasını sayısal bir diziye dönüştürme | |
let creditCardInt = input.split("").map(Number); | |
// Luhn Algoritması gereği her ikinci basamağı sondan başlayarak ikiyle çarparız | |
for (let i = creditCardInt.length - 2; i >= 0; i = i - 2) { | |
// Seçilen her ikinci basamağı geçici bir değişkende saklarız | |
let tempValue = creditCardInt[i]; |
OlderNewer