What interested me this week❓

👉 React: Chakra, security, device-based code-splitting
👉 ReactNative: at Wix / ProductHunt, React-Navigation v6, Expo Application Services...
👉 TypeScript: at Bloomberg
👉 No-JS
👉 No-Else
👉 No-pipeline
👉 ...

🧵🧵🧵 Details 👇👇👇
A nice React security cheatsheet has been posted by @ronperris from @snyksec, with 10 best practices

snyk.io/blog/10-react-…
Chakra UI v1 has been released, congratz to @thesegunadebayo for his popular accessible UI library.

Thoughts of @moubi on device-based code-splitting, when CSS media queries are not enough.

Would be interesting to have a follow-up post discussing the integration with server-side rendering.

webup.org/blog/react-dev…
Wix has been a ReactNative early adopter and plans to deliver a deep dive into their ReactNative usage, as a series of 8 posts.

The 2 first posts have been published by @omribruchim already.

medium.com/wix-engineerin…
Product Hunt also use ReactNative and looks like to have a nicely architectured application, according to the talk slides of @rstankov.

TS codegen, typesafe routing, generic createScreen, generic loading screen... should give you some inspiration

speakerdeck.com/rstankov/react…
Keeping up with React Native

@Andrei_Calazans shared the tools he currently likes for building RN apps, and committed to maintain the post over time.
andrei-calazans.com/posts/2020-10-…

Note: @RozenMD did the same recently for ReactJS: maxrozen.com/keeping-up-wit…
Some insights into the future of @Expo ?

The CTO @JI recently mentioned some interesting bits here about Expo in 2021+:
- Managed workflow superseeded
- Expo Application Services

Hope to hear more about all this soon

expo.canny.io/feature-reques…
Also some infos about React-Navigation v6, with a roadmap and work in progress by @satya164

It shouldn't be a full rewrite this time 🤪

github.com/react-navigati…
If you don't know how to search a JS operator like "??" in google, you'll find this operator search engine from @JoshWComeau helpful

joshwcomeau.com/operator-looku…

His upcoming post is really nice too, but you'll have to subscribe to his newsletter to read it 👌
Bloomberg has thousands of developers, millions of JavaScript code, their own runtime/tooling...

@robpalmer2 shared 10 insights about adopting TypeScript at scale.

Very interesting read, even if not everything will apply to your own smaller projects

techatbloomberg.com/blog/10-insigh…
The Bloomberg TS post above mentions the impact of choosing interfaces over type aliases

@ncjamieson gave more explanations on this post.

ncjamieson.com/prefer-interfa…

@drosenwasser advice to use interfaces whenever possible over type aliases 😱

Do we really need else statements?

@dglsparsons suggest that we can replace those with early returns.

I tend to agree with him: handling the conditional cases in early returns make the rest of the code simpler.

dev.to/dglsparsons/wr…
For @carlmjohnson , you'd rather improve the No-JS support rather than focusing on IE11 support.

Really agree with this, and I even try to make a No-JS mode for Docusaurus.

Content sites should work without SPA/React hydration (at least partially)

blog.carlmjohnson.net/post/2020/time…
Should we have a native pipe |> operator in JS?

After using it in blog posts, it seems @DanShappir finally thinks that it's not needed to extend the language, and a pipe() function is good enough.

wix.engineering/post/interlude…
NVM 0.37 has been released by @ljharb

This makes me happy because performance of NVM has always been a problem to me, and this release brings me something like a x2 performance improvement when switching node versions!

github.com/nvm-sh/nvm/rel…
If you don't know Flexbox already, there are multiple games to learn it in a friendly way

@geddski released the v2 of the Flexbox Zombie game

A recall by @samjarman that you should strive to make your async code execute in parallel whenever possible

samjarman.co.nz/blog/promisedo…

In my experience, even if you know this, you still fall into the trap of writing sequential code by mistake 😅
The project I work on with Facebook, @docusaurus, just reached 20k Github stars!

Don't forget to check it!

github.com/facebook/docus…
The end of this week!

But you can read about what interested me before here:

Thread based on my French newsletter for open-minded React developers

getrevue.co/profile/sebast…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sebastien Lorber

Sebastien Lorber Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sebastienlorber

26 Oct
What interested me this week:
- Releases: React 17, CRA 4, Node 15
- React compared to Svelte and Vue
- Skypack quality score
- HTTP/3 support spreading
- Framer Motion page transitions
- ...

🧵🧵🧵Details 👇👇👇
React 17

No new feature, but the ability to use 2 versions of React in the same app and simplify gradual updates.

Changes to the event delegation model, and the new JSX transform.

reactjs.org/blog/2020/10/2…
Create-React-App 4.0

- Fast Refresh
- React 17 (with new JSX transform)
- ESLint 7
- Typescript 4
- Jest 26
- ...

github.com/facebook/creat…
Read 15 tweets
24 Jul
@docusaurus This is a big Docusaurus release, with a lot of improvements.

Thanks to the many contributors to this release, in particular, the @MLHacks fellowship folks.

Here are some highlights

👇👇👇
@docusaurus @MLHacks PWA support, with @workboxjs service workers

With the ability to install the documentation websites and browse them 100% offline
@docusaurus @MLHacks @workboxjs Docusaurus is one of the first to integrate the new @algolia DocSearch v3 experience

The search dropdown is replaced by a fullscreen modal with dark mode support, keyboard shortcuts, favorite docs...
Read 9 tweets
29 Sep 19
After using hooks for a while, and being familiar with the stale closure problem, I don't really understand why we need to handle closure dependencies, instead of just doing something like the following which always executes latest provided closure (capturing fresh variables)
Coupling the dependencies of the closure and the conditions to trigger effect re-execution does not make much sense to me. For me it's perfectly valid to want to capture some variables in the closure, yet when those variables change we don't necessarily want to re-execute
Note that the above code is already used in major frameworks like Formik by @jaredpalmer and probably some others too. Here's a reference:
github.com/jaredpalmer/fo…
React-redux seems to use something a bit similar here: github.com/reduxjs/react-…
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!