Working with React

When working with React, other frameworks, or bundlers like Webpack and Parcel, you'll need to understand how to effectively use them inside the developer tool. There are various options available to you, depending on your workflow needs.

Adding a plugin to the workspace

In this particular scenario, you'll essentially have two manifest.json files. One will be in your plugin's source code directory, and the other will be in your plugin's distribution directory.

You can load either one of these, but you need to be aware of the differences.

Another important note is that if you're adding a plugin that uses a bundler or framework make sure you install its dependencies – for example, if you're downloading the sample plugins for Photoshop, you'll need to run npm install or yarn install for those based on React. The Developer Tool will not do this for you.

Watching your plugin

When using bundlers or frameworks, you'll typically have a build step that watches your plugins for changes. The developer tool does not know about your build steps, so if you want the developer tool to reload automatically when changes are detected, you'll need to:

When your watch build process detects a change, it'll rebuild the plugin, and this will cause the Developer Tool to see the resulting build changes and reload the plugin in the host.