-
Notifications
You must be signed in to change notification settings - Fork 178
Stop using React internals #419
Comments
Thanks for bringing this topic to my attention! I've commented on the Twitter thread:
Considering that facebook.com uses Now, with regards to this "Stop using React internals" topic, I think this could be done like this for example:
[
'bonjour',
React.createElement(
'strong',
{ className: 'greeting' },
'le monde'
)
]
<Example>
<FbtComponent desc="...">
Hello
<strong class="greeting">
world
</strong>
</FbtComponent>
</Example> After: <Example>
{
// using array node and direct strings because <fbt> and JSX have different ways
// to interpret "white space" between text and JSX entities (if I recall correctly)
[
// 1. Pseudo-code for the client-side fbt._() translation payload for simplicity
// 2. By now, fbt._() may only return plain strings
fbt._('Bonjour'),
<strong class="greeting">
{
fbt._('le monde')
}
</strong>
]
}
</Example> This is just some quick mental rumbling from me today though! It's not entirely fleshed out but I hope it helps! PS: I've moved on from the Meta i18n team a while ago but I'm still hovering over this repo now and then ;-) |
🚀 Feature Proposal
Stop using React internals.
Motivation
https://x.com/sebmarkbage/status/1795892981976752210
Example
N/A
Pitch
I do really think
fbt
offers the best DX among the i18n libs out there. However when maintainers of React highly recommends against using it, it's a hard sell.The text was updated successfully, but these errors were encountered: