facebook / fbt

A JavaScript Internationalization Framework
https://facebook.github.io/fbt
MIT License
3.88k stars 178 forks source link

Temporary fix for fbt for React 19 RC. #416

Closed cpojer closed 3 months ago

cpojer commented 4 months ago

Summary

React 19 RC throws when encountering "fake" React elements. JSX likely needs to be changed significantly to work with future versions of React, but this unblocks anyone using fbt in open source. However, now fbt only works in React 19, and I'm not sure how to actually make it work both in React 18 and 19 at the same time, though.

I also had to update the .gitignore. One dist folder was missing from .gitignore, and it also doesn't support comments so node_modules weren't actually ignored.

Test plan

I patched this into my code and it seems to work.

cpojer commented 3 months ago

I think I'm just gonna fork fbt.