Gutenberg comes with its own dependencies, lets say React and React DOM...

If I'm building a plugin, should I add the same dependencies for it? Wouldn't that mean that it loads React twice and it just increases the file size.

1 Answer 1


No, you should not add the same dependencies. Use dependencies that WordPress core already has. Gutenberg is already loading these, adding your own would lead to complication and most cases some functionality will not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.