hello.js

var please = require('share');
console.log('thank you');

Monday, 4 February, 2019 UTC

React as a UI Runtime

React as a UI Runtime

Most tutorials introduce React as a UI library. This makes sense because React is a UI library. That’s literally what the tagline says! I’ve written about the challenges of creating user interfaces before. But this post talks about React in a different ... more


Monday, 4 February, 2019 UTC

Making setInterval Declarative with React Hooks

Making setInterval Declarative with React Hooks

If you played with React Hooks for more than a few hours, you probably ran into an intriguing problem: using setInterval just doesn’t work as you’d expect. In the words of Ryan Florence: I’ve had a lot of people point to setInterval with hooks as some ... more


Friday, 25 January, 2019 UTC

The “Bug-O” Notation

The “Bug-O” Notation

When you write performance-sensitive code, it’s a good idea to keep in mind its algorithmic complexity. It is often expressed with the Big-O notation. Big-O is a measure of how much slower the code will get as you throw more data at it . For example, ... more


Tuesday, 15 January, 2019 UTC

2018年,那些我所不知道的技術

2018年,那些我所不知道的技術

大家常以為我懂很多技術。事實上,人們假設的遠比我真正懂的還要多出許多。這並非壞事,我也不是在抱怨。(少數族群的朋友們,儘管他們擁有努力得來的證書,則常受到相反的偏見。) 在這篇文章裡,我會列出一些大家以為我會,但我其實不會的程式設計相關的技術 。我並不是說 你 不需要去學習它們 — 或是 其他 有用但我所不知道的東西。但既然我現在並非身處弱勢,我可以誠實地談論這個議題。 為什麼我覺得這很重要? 首先,很多人對於有經驗的工程師常有一個不切實際的迷思,認為他們一定知道自己領域內的所有技術。你有看過那種列出一大堆函式庫和工具的「學習路線圖」嗎?它們很有用,但也令人望而生畏。 ... more


Tuesday, 15 January, 2019 UTC

Neden super(props) yazıyoruz?

Neden super(props) yazıyoruz?

Duyduğuma göre Hooks en çok konuşulan yenilik olmuş. İronik olarak, bu bloğu class bileşenleri hakkında bilinmeyen gerçekleri açıklamak için açmak istedim. Burda anlatılanlar, React’ı üretken olarak kullanmak için çok da önemli değil . Ancak bir şeylerin ... more


Sunday, 30 December, 2018 UTC

The Elements of UI Engineering

The Elements of UI Engineering

In my previous post, I talked about admitting our knowledge gaps. You might conclude that I suggest settling for mediocrity. I don’t! This is a broad field. I strongly believe that you can “begin anywhere” and don’t need to learn technologies in any ... more


Friday, 28 December, 2018 UTC

Things I Don’t Know as of 2018

Things I Don’t Know as of 2018

People often assume that I know far more than I actually do. That’s not a bad problem to have and I’m not complaining. (Folks from minority groups often suffer the opposite bias despite their hard-earned credentials, and that sucks .) In this post I’ll ... more


Thursday, 13 December, 2018 UTC

Why Do React Hooks Rely on Call Order?

Why Do React Hooks Rely on Call Order?

At React Conf 2018, the React team presented the Hooks proposal. If you’d like to understand what Hooks are and what problems they solve, check out our talks introducing them and my follow-up article addressing common misconceptions. Chances are you ... more


Sunday, 9 December, 2018 UTC

How Does setState Know What to Do?

How Does setState Know What to Do?

When you call setState in a component, what do you think happens? import React from 'react'; import ReactDOM from 'react-dom'; class Button extends React.Component { constructor(props) { super(props); this.state = { clicked: false }; this.handleClick ... more


Saturday, 8 December, 2018 UTC

My Wishlist for Hot Reloading

My Wishlist for Hot Reloading

Do you have a project that you approach repeatedly with a mix of success and failure, step aside for a while, and then try again — year after year? For some, it might be a router or a virtual list scroller. For me, it’s hot reloading. My first exposure ... more


Tuesday, 4 December, 2018 UTC

Why Do React Elements Have a $$typeof Property?

Why Do React Elements Have a $$typeof Property?

You might think you’re writing JSX: <marquee bgcolor="#ffa7c4">hi</marquee> But really, you’re calling a function: React.createElement( /* type */ 'marquee', /* props */ { bgcolor: '#ffa7c4' }, /* children */ 'hi' ) And that function ... more


Monday, 3 December, 2018 UTC

Why Do React Elements Have a $$typeof Property?

Why Do React Elements Have a $$typeof Property?

You might think you’re writing JSX: <marquee bgcolor="#ffa7c4">hi</marquee> But really, you’re calling a function: React.createElement( /* type */ 'marquee', /* props */ { bgcolor: '#ffa7c4' }, /* children */ 'hi' ) And that function ... more


Sunday, 2 December, 2018 UTC

How Does React Tell a Class from a Function?

How Does React Tell a Class from a Function?

Consider this Greeting component which is defined as a function: function Greeting() { return <p>Hello</p>; } React also supports defining it as a class: class Greeting extends React.Component { render() { return <p>Hello</p>; ... more


Sunday, 2 December, 2018 UTC

How Does React Tell a Class from a Function?

How Does React Tell a Class from a Function?

Consider this Greeting component which is defined as a function: function Greeting() { return <p>Hello</p>; } React also supports defining it as a class: class Greeting extends React.Component { render() { return <p>Hello</p>; ... more


Friday, 30 November, 2018 UTC

Why Do We Write super(props)?

Why Do We Write super(props)?

I heard Hooks are the new hotness. Ironically, I want to start this blog by describing fun facts about class components. How about that! These gotchas are not important for using React productively. But you might find them amusing if you like to dig ... more


Friday, 30 November, 2018 UTC

Why Do We Write super(props)?

Why Do We Write super(props)?

I heard Hooks are the new hotness. Ironically, I want to start this blog by describing fun facts about class components. How about that! These gotchas are not important for using React productively. But you might find them amusing if you like to dig ... more