Back to articles
behind the scenes: what are these all caps react imports?

behind the scenes: what are these all caps react imports?

via Dev.to ReactBeey

Table of contents what the tags are why are the tags named this the tag names what even is that tag why to never use tags that look like this what happens when you import these internal constants notes clarification what the tags are The tags with these names are internal react imports. why are the tags named this They are named this because its a deterant name even tho you dont get fired for importing this. the tag names DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES And alot more what even is that tag I know this sounds really weird: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES Even tho it sounds weird this is acutualy reacts internal constant . That tag is a ref cleanup. This is also what react treats as a cleanup function . why to never use tags that look like this Tags that start with DO_NOT_USE_OR_YOU_WILL_BE_FIRED or DO_NOT_USE are never meant to be imported. what happens when you import these internal constants On minor updates, your app will break . R

Continue reading on Dev.to React

Opens in a new tab

Read Full Article
8 views

Related Articles