airbnb

Solving linter error no-undef for document

早过忘川 提交于 2019-11-28 18:11:52
I am using airbnb extension for linting my React Project. Now, in my index.js I have: import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( <App />, document.getElementById('root'), ); linter says: no-undef 'document' is not defined.at line 8 col 3 How can I solve this problem? There are a number of ways to solve/get around this. The two key ways are to either specify document as global or to set the eslint-env as browser (what you probably want). You can do this 1) in-file, 2) in the configuration, or even 3) when running from the CLI. 1) In

Why does the Airbnb style guide say that relying on function name inference is discouraged?

☆樱花仙子☆ 提交于 2019-11-28 04:19:09
// bad class Listing extends React.Component { render() { return <div>{this.props.hello}</div>; } } // bad (relying on function name inference is discouraged) const Listing = ({ hello }) => ( <div>{hello}</div> ); // good function Listing({ hello }) { return <div>{hello}</div>; } This is taken from the Airbnb react style guide. Can someone please explain why "relying on function name inference is discouraged"? Is it just a style concern? I think this could also have something to do with the unexpected behaviour that you might run into from implicitly giving a lexical name to what you may

Android Warning: Native component for “AIRMap” does not exist

依然范特西╮ 提交于 2019-11-27 18:13:57
问题 I have successfully added airbnb map in react app. But when I am adding airbnb map view to existing android native application. I am getting always empty map with red border. I am using RN 0.40 and react-native-maps 0.13.0. after the react-native link commands. Then android always have the Warning: Native component for "AIRMap" does not exist. Running application "App" with appParams: {"initialProps":{},"rootTag":1}. DEV === true, development-level warning are ON, performance optimizations

如何向最厉害的人偷师?

廉价感情. 提交于 2019-11-27 15:00:19
向最厉害的人偷师是让自己进步最快的方法,也是每个人都想做的,问题的关键是: 1、清楚的知道你的问题是什么,充满好奇心、追根溯源找到真问题,找到这个领域最厉害的人。 2、勇敢真诚去请教,不怕丢脸。 3、得到别人的建议后立即实施,知行合一、实践出真知。 案例: Airbnb创始人Brian Chesky曾经足足向巴菲特问了4个半小时的问题,还没把巴菲特问烦。巴菲特还主动邀请他吃午餐,他一分钱都没花。我们都知道,和巴菲特吃顿午餐是特别贵的事,2019年的价格已经超过了3000万人民币了。 接下来,我就用Chesky的例子,来教你怎么“向最厉害的人偷师”。具体来说,有四个建议: 1. 追根溯源;2. 充满好奇心;3. 不怕丢脸;4. 立即实施。 一、追根溯源,找到权威。 Chesky在每次请教之前,都会研究和确定一个领域最权威的人是谁,然后直接去向这个人学习。这个方法也是美国前国防部长麦克纳马拉非常推崇的。他曾经说过这么一句话,“身处战争或创业中的人只能以最直接的方式去学习”。换句话说,没有时间浪费在那些不够权威的人身上。 比如说,他会向苹果公司的乔纳森•伊夫去学习设计理念,向迪士尼公司的鲍勃•伊格尔学习管理才能,向Facebook创始人马克•扎克伯格去学习对产品的追求。当然,有的时候他选择导师也有点出人意料。比方说他想学习酒店管理经验,他并没去著名酒店,而是去了一家有名的餐厅

Solving linter error no-undef for document

匆匆过客 提交于 2019-11-27 11:06:02
问题 I am using airbnb extension for linting my React Project. Now, in my index.js I have: import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( <App />, document.getElementById('root'), ); linter says: no-undef 'document' is not defined.at line 8 col 3 How can I solve this problem? 回答1: There are a number of ways to solve/get around this. The two key ways are to either specify document as global or to set the eslint-env as browser (what you

Why does the Airbnb style guide say that relying on function name inference is discouraged?

筅森魡賤 提交于 2019-11-27 00:20:20
问题 // bad class Listing extends React.Component { render() { return <div>{this.props.hello}</div>; } } // bad (relying on function name inference is discouraged) const Listing = ({ hello }) => ( <div>{hello}</div> ); // good function Listing({ hello }) { return <div>{hello}</div>; } This is taken from the Airbnb react style guide. Can someone please explain why "relying on function name inference is discouraged"? Is it just a style concern? 回答1: I think this could also have something to do with

2018“硅谷技划”随笔(一):再论中美员工福利巨大差距的背后

╄→гoц情女王★ 提交于 2019-11-25 23:48:16
第二次的“硅谷技划”,首站是去年曾经到访过的Airbnb(中文名爱彼迎;也许是因为发音比较麻烦,硅谷人喜欢简称“AB”)。 时隔一年多故地重游,Airbnb越发的显示出互联网新贵的气势:Barnaan街888的总部,5层楼已经被Airbnb全数收入囊中,临近的999号也已经全部入住,听说还有附近一座楼(楼号估计也不错)即将投入使用。当然,设施、装修、餐饮等标准只能上升不能下降(不了解的诸君可以参考老杨去年的游记,或者自行查询,别太羡慕就好)——就算这样,中午用餐的时候接待我们的朋友还吐槽说Airbnbn的午餐太难下咽,不如我们下午将要造访的Twitter。 细节不再赘述,总之一个与去年类似的问题再次萦绕心间:美国总体对员工的高福利待遇及养老式的工作心态,为何依然能保持高速增长和持续创新?这种方式对比中国创业公司的苦逼环境,对公司总体业务运营的现在和未来,究竟有着怎么样的影响?是否一定要用公司的高福利来“培养”公司的竞争力? 【2017相关方面的思考请参见 2017“硅谷技划”日记之四:我们究竟应该从硅谷学习什么? 】 孰对孰错?中美企业对员工的福利差异浅析 先简单列举一下我看到的中美企业在员工管理和福利方面的差异吧: 首先,中美从公司老板到员工对办公室环境的期望迥异。 办公室的舒适是美国互联网公司的基本要求,这种舒适是全方位的,大到公司地址的选择、办公室空间的预留