This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Mention that we prefer importing from @wordpress/element
instead of react
#6732
Labels
focus: documentation
This issue is a request for better documentation.
type: cooldown
Things that are queued for a cooldown period (assists with planning).
In our repo we want to try to avoid importing directly from
react
as a policy. Instead, developers should use@wordpress/element
. I was informed of this by @Aljullu on this PR, but I hadn't noticed myself, as our repo is a bit inconsistent (92 instances of importing fromreact
vs 154 of importing from@wordpress/element
).However, the philosophy behind this is very solid: we want an abstraction layer so we don't have to rely on a specific underlying implementation. As such, me and @Aljullu agree that this preference should be indicated somewhere in the repo docs, and—I should add—we should perhaps migrate all the current
react
imports to@wordpress/element
.The text was updated successfully, but these errors were encountered: