Indeed - Iβm not fully sure what it would even mean for a bundler to natively support ESM, or CJS for that matter. There are no ESM bundles (yet)
Bundlers donβt implement module systems, they create scripts that emulate them. All any bundler does is reduce graphs. How is just implementation detail.
16.12.2024 21:08 β π 4 π 0 π¬ 0 π 0
(*experimentalImportSupport was designed for runtime perf in opinionated codebases, and doesnβt yet support circular dependencies or `export let`)
16.12.2024 20:30 β π 2 π 0 π¬ 0 π 0
Yep. Although neither is really βnativeβ (thatβs on the engine), both are just Babel transforms.
The difference is mostly that in the latter case Metro can tell the difference between imports and requires, for things like Expo tree shaking, conditional resolution, and inlining.
16.12.2024 20:27 β π 4 π 0 π¬ 1 π 0
As a tooling guy I have a lot of sympathy for this - even in Metro, Flow was a pain point in SWC experiments.
But DX for us is about users building apps. Ease of bring-your-own-toolchain isnβt a DX goal.
If you use a framework itβs a non-issue, if you author a framework, build on the common core.
16.12.2024 16:05 β π 2 π 0 π¬ 1 π 0
The other possibility is something like JS0, essentially a communicable, specced intermediate.
The problem with the status quo is we talk about pre-compilation with no agreed target (Node LTS, browserslist, ES5?). Most pre-compiled node_modules wouldnβt run in Hermes, so we have to compile again.
16.12.2024 15:50 β π 2 π 0 π¬ 1 π 0
Yeah, I think weβre probably just talking about different time horizons, ultimately I expect precompilation to go away because I think itβs been a crutch we ideally wouldnβt need, but I donβt think itβll be soon - just signs weβre moving that way.
16.12.2024 15:44 β π 2 π 0 π¬ 1 π 0
It matters if the pre-compilation loses information or adds cruft, which it generally does.
Besides bundles being smaller and faster, publishing source is easier, and itβs more hackable and debug friendly.
With Bun+Node supporting TS directly and web still build reliant, we might see more of it.
16.12.2024 02:18 β π 3 π 0 π¬ 1 π 0
Libraries shipping Flow/TS source might turn out to be well-placed for Static Hermes.
In general, there are good arguments for preserving information. Pre-compiled is rarely optimally compiled. Itβs just not the way the ecosystem has gone.
16.12.2024 01:47 β π 6 π 0 π¬ 1 π 0
Yep, especially because βhide sourceβ and βsensitiveβ are a thing.
(..which are also not respected in lazy comp, but the difference is pretty superficial - `[bytecode]` instead of `[native code]`)
15.12.2024 21:49 β π 3 π 0 π¬ 0 π 0
Before compilation would make sense as an explanation, but even invoking the function before calling its toString doesnβt help. I suspect Hermes is looking in the wrong place (original AST?) for the directive.
Tzvetanβs confirmed itβs a Hermes bug and Static Hermes works, though.
15.12.2024 21:44 β π 5 π 0 π¬ 1 π 0
Ok, sniped π
! This turns out to be because `show source` doesnβt work under lazy Hermes compilation if the input is >64KB, the preemptive compile threshold (hence appearing to work under Fast Refresh but not initial load).
Following up with Hermes as to whether thatβs expected or a bugβ¦
15.12.2024 13:28 β π 4 π 0 π¬ 2 π 0
Would love to improve things here - what kind of errors do you run into? Cross web/mobile or between native platforms?
08.12.2024 23:02 β π 2 π 0 π¬ 1 π 0
RN receives and accepts more community contributions than React/GQL, partly because itβs a bigger surface, but it has a lively community.
DevTools though was built in the open by a dedicated team at Meta over many months. That was the only way we were going to ship the ground-up rewrite it needed.
07.12.2024 17:04 β π 3 π 0 π¬ 1 π 0
React Native 0.77 is stabilising with the second RC out yesterday. Do give it a try, let us know how you get on! github.com/facebook/rea...
05.12.2024 08:58 β π 23 π 3 π¬ 0 π 0
Thatβs basically how I was taught it. Itβs the empty product. Multiplying no things gets you the multiplicative identity, same as summing no things = additive identity.
23.11.2024 08:12 β π 2 π 0 π¬ 1 π 0
Sometimes the best engineering happens when youβre just tinkering, free from expectations and deadlines.
10.11.2024 09:35 β π 363 π 51 π¬ 19 π 12
Remember when phones looked like the phone icon?
09.11.2024 17:16 β π 2 π 0 π¬ 0 π 0
Maybe tweak that - choose labels based on the distinctions you need to make - eg if you have some expensive tests that only run nightly, label them accordingly.
If you donβt need to distinguish, just call them all βtestsβ.
09.11.2024 16:59 β π 1 π 0 π¬ 0 π 0
Event-source everything!
09.11.2024 16:49 β π 0 π 0 π¬ 0 π 0
Thatβs a shortcoming of the testing framework IMO - theyβre not true e2e tests if they depend on details your user doesnβt act on/observe.
If you had an AI testing framework that let you write βtap the most obvious buttonβ -> βsee confirmation pageβ youβd be a lot closer to e2e for human UIs.
09.11.2024 16:32 β π 3 π 0 π¬ 0 π 0
The distinctions can be meaningful - for example any change that breaks an e2e test is by definition semver major.
09.11.2024 16:19 β π 3 π 0 π¬ 1 π 0
Eg: testing a React component may be a unit test if youβre writing an app, but an e2e test of the react library itself.
09.11.2024 16:11 β π 3 π 0 π¬ 1 π 0
IMO: Unit tests test an indivisible piece of the software under test.
An integration test is any test that isnβt a unit test.
e2e tests are the subset of integration tests that deal with user input to user-observable output/effect.
All relative to where the boundaries of your software are.
09.11.2024 16:09 β π 10 π 0 π¬ 2 π 0
I hear this is where tech twitter went
06.11.2024 15:15 β π 9 π 1 π¬ 0 π 0
The new React Native DevTools are wild.
No additional tools are required to drill down into your components like this.
WOW π₯
05.11.2024 08:12 β π 40 π 7 π¬ 7 π 0
bsky is the best react native app Iβve ever seen
04.11.2024 16:36 β π 273 π 6 π¬ 26 π 2
Hi folks! π
βοΈππ¦
02.11.2024 09:47 β π 25 π 0 π¬ 2 π 0
The place to go for the latest snooker results and rankings. We recently moved here from Twitter. See also snooker.org and linktr.ee/snookerorg.
Mostly read/rarely post β’ https://www.twitch.tv/shikasd β’ Jetpack Compose @ Google β’ Opinions are my own
Senior Indie Wannabe - SWE Specialized in FE
π²boardgamesrh.com - Rules helper
π₯·Postponing a secret project
π§βπ»Software Design
SwiftUI at Meta β’ http://swiftui.wtf β’ Philly
Programmer, craftsman, philosopher. react-native, C++. Former @expo.dev and author of react-native-shared-element. Rocker of punk and player of table tennis. Likes cats.
https://github.com/ijzerenhein
According to git blame, I wrote the TypeScript compiler, don't fact check that
Senior Software Engineer at Microsoft working on TypeScript
Underground gopher, finally revealed
https://jakebailey.dev/
https://github.com/jakebailey
arch btw
Staff Software Engineer @ Nearform | Co-founder of http://papertrail.io | React {Native} | Newcastle, UK | Dad of 2
Comment and careers editor for Chemistry World. Professional words person, very amateur drawing person
Director of Engineering @infinitered
#reactnative
React Native Radio host
Mom of 2
React Native dev at Callstack
Software and coffee @th3rdwave.coffee
Computer scientist. Cider drinker. Dungeon Master.
Maintainer of @typescript-eslint.io
Software Engineer @ Canva.
https://zacher.com.au
π¦ CSS Modules co-creator / πΏ Remix + React Router at Shopify / π§ Vanilla Extract / MelbJS organiser / dad x4
i want everyone to aspire to integrity, intensity, and intentionality. see also @latent.space
just a nice guy doing stuff at Callstack
React Native Enthusiast | Ex-developer of React Native Screens, working at @swmansion π
React Universe Dev @ Callstack