Duncan Leung (@leungd) header
Duncan Leung (@leungd) profile picture

Frontend Engineering Lead

Irvine, CA
Joined April 2008
Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)Photo by Duncan Leung (@leungd)
Thanks @leungd that was helpful- AWS Amplify TypeScript aws-exports.js duncanleung.com/aws-amplify-… via @leungd
Thanks Duncan, this article really helped me. I have encountered this issue and solved it with help from this post. Fixing React Warning: Synthetic Events in setState() duncanleung.com/fixing-react… via @leungd
1
1
To celebrate this year's @graphqlsummit I'm giving away 3 copies of Production Ready #GraphQL 🎉 All you need to do is like and retweet this tweet and I'll pick 3 people at random on Thursday after the "GraphQL in Production" panel 😀 #graphqlsummit book.productionreadygraphql.…
2
160
9
225
Duncan Leung retweeted
TypeScript Module Declaration for SVG Assets duncanleung.com/typescript-m… a través de @leungd
🎉 It's here! Advanced React Security Patterns is live 😄 It's the most complete resource you'll find to learn about auth * JWT * Cookies/sessions * Serverless * Auth with @auth0, @GatsbyJS, Next.js, @Netlify reactsecurity.io/advanced-re… #reactjs #javascript RTs appreciated 🙏
18
216
22
630
Regex is an incredibly powerful tool. But with great power comes great responsibility. Here are some strategies for applying regular expressions in *responsible* ways (that won't make your eyes bleed) Image alt: gist.github.com/jamiebuilds/…
7
53
6
339
Duncan Leung retweeted
#SERVERLESS ANNOUNCEMENT TIME! I've just launched the "Serverless Reference Architecture Project" to capture, share, explore, and debate the patterns and practices being used in serverless production apps. It's a community project, so please contribute! jeremydaly.com/announcing-th…
8
152
13
409
Duncan Leung retweeted
It's better to do less than you hoped than nothing at all. No zero days.
68
1,096
101
5,702
Yipes- technology used as a blocker to claiming unemployment benefits youtu.be/ualUPur6iks
Duncan Leung retweeted
This is really exciting stuff! Node 12 (current LTS) now lets you use `import` and `export` w/out any special flags. That means no more compiling with Babel just so you can use ES modules! Huge congrats to Myles and everyone who made this possible *in a current LTS release*! 🥳
🎉🎉🎉🎉🎉🎉🎉🎉🎉 ESM is now unflagged, but still experimental, on Node.js 12 $ nvm install 12.17.0 🎉🎉🎉🎉🎉🎉🎉🎉🎉
5
46
2
288
I couldn't help myself...
This quoted post is unavailable.
136
822
252
3,576
Our org’s transition to TS was through my sneaking in // @ ts-check everywhere 😅 to show the team they were already doing the hard work of annotating types with JSDoc, but missing the full benefits of TS. “Show, don’t tell” made the difference. – at Irvine, CA
⚛️📜 React ecosystem libraries that have rewritten their core to @TypeScript (not just offering TypeScript support): ✅Next.js ✅@ReactNative CLI ✅React Router ✅@expo ✅Redux ✅@Yarnpkg ✅@fbjest ✅@storybookjs ✅@apollographql 🔜@Gatsbyjs ❌@Reactjs react-typescript-cheatsheet.…
1
2
Majestic. Was once told by an events organiser about a keynote booked to talk to BA senior leadership. Turned up 50 minutes late. They were irritated. Told them their own hand book stated a flight up to 50 mins late wasn’t actually late. Then walked off stage.
4
56
5
474
Duncan Leung retweeted
I was once invited to speak at McKinsey. I started by asking, “how many of you have ever started or run your own business?” No one put their hands up. I then announced the name of my presention, “Anything is easy when you don’t have to do it”. I’ve not been invited back.
243
3,830
564
17,969
TypeScript Module Declaration for SVG Assets duncanleung.com/typescript-m… 来自 @leungd
useState: Persist value between renders, trigger re-render useRef: Persist value between renders, no re-render useEffect: Side effects that run after render useReducer: useState in reducer pattern useMemo: Memoize value between renders useCB: Persist ref equality between renders
40
986
53
3,766
Hi guys/gals! 👋🏻 i am trying to create a community in OC, Southern Cal that enjoys web development with JavaScript/TypeScript, so we can have knowledge sharing and make friends! Retweet or respond, esp if you are in So Cal! @typescriptlang #javascript #typescript #webdevelopment
2
3
7
Duncan Leung retweeted
This tweet truly is the most insightful article written on the subject of type systems that I've ever read in my life.
Me: I think I'm done JavaScript: Looks good to me Me: Hope it works JS: I believe in you Me: ... JS: undefined is not a function Me: I thi-- TypeScript: Nope Me: What abou-- TS: Wrong Me: ... TS: cannot invoke an expression whose type lacks a call signature
2
27
112