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 https://snyk.io/blog/10-react-security-best-practices/
Chakra UI v1 has been released, congratz to @thesegunadebayo for his popular accessible UI library. https://twitter.com/thesegunadebayo/status/1327234974970425344
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. https://webup.org/blog/react-device-based-code-split/
Would be interesting to have a follow-up post discussing the integration with server-side rendering. https://webup.org/blog/react-device-based-code-split/
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. https://medium.com/wix-engineering/react-native-at-wix-d56c3745aaff
The 2 first posts have been published by @omribruchim already. https://medium.com/wix-engineering/react-native-at-wix-d56c3745aaff
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 https://speakerdeck.com/rstankov/react-native-architecture-at-product-hunt
TS codegen, typesafe routing, generic createScreen, generic loading screen... should give you some inspiration https://speakerdeck.com/rstankov/react-native-architecture-at-product-hunt
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.
https://andrei-calazans.com/posts/2020-10-27/keeping-up-with-react-native
Note: @RozenMD did the same recently for ReactJS: https://maxrozen.com/keeping-up-with-react-libraries/
@Andrei_Calazans shared the tools he currently likes for building RN apps, and committed to maintain the post over time.
https://andrei-calazans.com/posts/2020-10-27/keeping-up-with-react-native
Note: @RozenMD did the same recently for ReactJS: https://maxrozen.com/keeping-up-with-react-libraries/
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
https://expo.canny.io/feature-requests/p/in-app-purchases
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
https://expo.canny.io/feature-requests/p/in-app-purchases
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
https://github.com/react-navigation/react-navigation/issues/8981
It shouldn't be a full rewrite this time

If you don't know how to search a JS operator like "??" in google, you'll find this operator search engine from @JoshWComeau helpful
https://joshwcomeau.com/operator-lookup/
His upcoming post is really nice too, but you'll have to subscribe to his newsletter to read it
https://joshwcomeau.com/operator-lookup/
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 https://www.techatbloomberg.com/blog/10-insights-adopting-typescript-at-scale
@robpalmer2 shared 10 insights about adopting TypeScript at scale.
Very interesting read, even if not everything will apply to your own smaller projects https://www.techatbloomberg.com/blog/10-insights-adopting-typescript-at-scale
The Bloomberg TS post above mentions the impact of choosing interfaces over type aliases
@ncjamieson gave more explanations on this post.
https://ncjamieson.com/prefer-interfaces/
@drosenwasser advice to use interfaces whenever possible over type aliases
https://twitter.com/drosenwasser/status/1319205169918144513
@ncjamieson gave more explanations on this post.
https://ncjamieson.com/prefer-interfaces/
@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. https://dev.to/dglsparsons/write-better-code-and-be-a-better-programmer-by-never-using-else-statements-4dbl
@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. https://dev.to/dglsparsons/write-better-code-and-be-a-better-programmer-by-never-using-else-statements-4dbl
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) https://blog.carlmjohnson.net/post/2020/time-to-kill-ie11/
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) https://blog.carlmjohnson.net/post/2020/time-to-kill-ie11/
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. https://www.wix.engineering/post/interlude-rethinking-the-javascript-pipeline-operator
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. https://www.wix.engineering/post/interlude-rethinking-the-javascript-pipeline-operator
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! https://github.com/nvm-sh/nvm/releases/tag/v0.37.0
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! https://github.com/nvm-sh/nvm/releases/tag/v0.37.0
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 https://twitter.com/geddski/status/1326189172919578627
@geddski released the v2 of the Flexbox Zombie game https://twitter.com/geddski/status/1326189172919578627
A recall by @samjarman that you should strive to make your async code execute in parallel whenever possible
https://www.samjarman.co.nz/blog/promisedotall
In my experience, even if you know this, you still fall into the trap of writing sequential code by mistake
https://www.samjarman.co.nz/blog/promisedotall
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! https://github.com/facebook/docusaurus
Don't forget to check it! https://github.com/facebook/docusaurus
The end of this week!
But you can read about what interested me before here: https://twitter.com/sebastienlorber/status/1325757641486905344
But you can read about what interested me before here: https://twitter.com/sebastienlorber/status/1325757641486905344
Thread based on my French newsletter for open-minded React developers https://www.getrevue.co/profile/sebastien-lorber/issues/react-hebdo-38-reactnative-typescript-securite-react-chakra-no-js-no-else-292163