mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Updates our Babel plugin to add an import to React if we succesfully compiled a function and cached one or more values. For now this logic is entirely in the Babel plugin itself, but long term we should move this into codegen and teach Forget to start the pipeline by lowering the whole Program node to an HIR (which would also allow us to understand imports and other module scope values being used). Right now it's not possible to add in codegen (without some ugly code) as a file containing multiple components would result in duplicate imports being generated