Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
202007-React對戰雷台
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
milkmidi
July 29, 2020
Technology
200
0
Share
202007-React對戰雷台
202007 五倍紅寶石 Vue React對戰雷台
milkmidi
July 29, 2020
More Decks by milkmidi
See All by milkmidi
202512-WebConfig 大 AI 時代,工程師的成長之路
milkmidi
0
400
202403-WebComponent
milkmidi
0
210
WebComponent
milkmidi
1
3.2k
前端好朋友-tailwindcss
milkmidi
0
8.6k
202110-federation
milkmidi
0
170
Vue3一次就上手
milkmidi
0
6.4k
Other Decks in Technology
See All in Technology
海外カンファレンス「JavaOne」参加レポート ユーザー系IT企業における目的・成果/JavaOne Report Purpose and Results in the User IT Company
muit
0
120
Diagnosing performance problems without the guesswork
elenatanasoiu
0
130
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
300
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
130
Kiro CLI v2.0.0がやってきた!
kentapapa
0
230
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
16
16k
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
980
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
610
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
390
Oracle Cloud Infrastructure:2026年5月度サービス・アップデート
oracle4engineer
PRO
1
270
美味しいスイスチーズを作ろう🧀🐭
taigamikami
1
190
はじめてのDatadog
kairim0
0
240
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
New Earth Scene 8
popppiees
3
2.3k
Writing Fast Ruby
sferik
630
63k
Designing for humans not robots
tammielis
254
26k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
290
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
310
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
None
App.vue <template> <div id="app"> <input type="text" v-model="name"> <button @click="atClickHandler($event)">Click</button> <MyComponent
foo.sync="foo" /> </div> </template>
None
App.vue <script> export default { name: 'iDontlikeCodeReviewVue', props: { lists:
{ type: Array } }, }; </script> <template> <div id="app"> <template v-if="lists?.length > 0"> <section v-for="o in lists"> <ul v-if="o.active"> <li v-for="o2 in lists.books"> <h1 v-if="o2.tag === ‘h1’">hi</h1> <a>{{o2.name}}</a> </li> </ul> </section> </template> </div> </template> App.jsx var InnerSection = (props) => { var { books, active } = props; if (!active) { return null; } return ( <ul> { books.map((item) => (<li><a>{item.name}</a></li>)) } </ul> ) } const IloveReact = (props)=> { var { lists } = props; if (lists?.length === 0) { return null; } return ( <div> { lists.map((list) => <InnerSection {...list} />) } </div> ) }
None
type BookType = { name: string; } type ListType =
{ active: boolean; books: BookType[]; } var InnerSection = (props:ListType) => { var { books, active } = props; if (!active) { return null; } return ( <ul> { books.map((item:BookType) => (<li><a>{item.name}</></li>)) } </ul> ) } interface Props { lists: ListType[] } const IloveReact = (props:Props)=> { var { lists } = props; if (lists?.length === 0) { return null; } return ( <div> { lists.map((list:ListType) => <InnerSection {...list} />) } </div> ) } typescript, flowjs
App.vue <script> export default { // // ... // methods:{
foo(){ // name data ? // porps ? this.name; // methods ? // vuex ? this.maybeCallFromVuex(‘ ?’); } } }; </script> App.jsx interface Props { onCallParent: (name:string)=> void; } interface State { name: string; } class LoveReact extends React.Component<Props, State> { componentDidMount(){ this.props.onCallParent(this.state.name); } }
App.vue <template lang="pug"> .row .col-xs-12.center ul.pagination li(v-bind:class="page<=1 ? 'disabled': ''")
template(v-if="page>1") a(href='' @click.prevent='prevPage') Previous template(v-else) a Previous template(v-for='(item, index) in pagenations’) li(v-bind:class="page===item ? 'active': ‘’” v-bind:key="item+'_'+Math.floor(Math.random()*9527)") a(href='' @click.prevent='gotoPage(item)’ v-bind:key="item+'_'+Math.floor(Math.random()*9527)") {{item}} li(v-bind:class="page>=totalpage ? 'disabled': ‘’”) template(v-if="page<totalpage") a(href='' @click.prevent='nextPage') Next template(v-else) a Next </template>
None
None
None
None
None
None
None
None
None
None
None