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
milkmidi
July 29, 2020
Technology
0
190
202007-React對戰雷台
202007 五倍紅寶石 Vue React對戰雷台
milkmidi
July 29, 2020
Tweet
Share
More Decks by milkmidi
See All by milkmidi
202512-WebConfig 大 AI 時代,工程師的成長之路
milkmidi
0
250
202403-WebComponent
milkmidi
0
190
WebComponent
milkmidi
1
3.2k
前端好朋友-tailwindcss
milkmidi
0
8.4k
202110-federation
milkmidi
0
150
Vue3一次就上手
milkmidi
0
6.3k
Other Decks in Technology
See All in Technology
みんなでAI上手ピーポーになろう! / Let’s All Get AI-Savvy!
kaminashi
0
200
20260120 Amazon VPC のパブリックサブネットを無くしたい!
masaruogura
2
160
AI Agent Standards and Protocols: a Walkthrough of MCP, A2A, and more...
glaforge
1
510
「違う現場で格闘する二人」——社内コミュニティがつないだトヨタ流アジャイルの実践とその先
shinichitakeuchi
0
580
AI Agent Agentic Workflow の可観測性 / Observability of AI Agent Agentic Workflow
yuzujoe
6
2.3k
OCI技術資料 : OS管理ハブ 概要
ocise
2
4.2k
それぞれのペースでやっていく Bet AI / Bet AI at Your Own Pace
yuyatakeyama
1
510
書籍執筆での生成AIの活用
sat
PRO
1
190
かわいい身体と声を持つ そういうものに私はなりたい
yoshimura_datam
0
350
AI時代のPMに求められるのは 「Ops」と「Enablement」
shimotaroo
1
300
Riverpod3.xで実現する実践的UI実装
fumiyasac0921
1
320
BPaaSオペレーション・kubell社内 n8n活用による効率化検証事例紹介
kubell_hr
0
210
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Mind Mapping
helmedeiros
PRO
0
54
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
420
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
170
Balancing Empowerment & Direction
lara
5
850
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
150
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