![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@twilio/flex-plugin
Advanced tools
Library to help building Twilio Flex Plugins.
npm install flex-plugin
import { loadPlugin, FlexPlugin } from '@twilio/flex-plugin';
class MyPlugin extends FlexPlugin {
pluginName = 'MyPlugin';
init(flex, manager) {
// set up your flex
flex.TaskCanvas.Content.add(<p>Hello</p>);
}
}
loadPlugin(MyPlugin);
Visit Twilio Docs for a tutorial on creating your first plugin.
To load external JS/CSS files into your plugin, we provide two helper methods: loadJS
and loadCSS
. Use them by calling these methods at the start of plugin initialization.
import { FlexPlugin, loadJS, loadCSS } from '@twilio/flex-plugin';
class MyPlugin extends FlexPlugin {
pluginName = 'MyPlugin';
init(flex, manager) {
loadJS('http://mysite.com/files/flex.js');
loadCSS(
'http://mysite.com/files/flex.css',
'http://mysite.com/files/flex-2.css',
);
// set up everything else
}
}
The CSS/JS files must be accessible by Twilio's proxy servers. Local files on your desktop are likely inaccessible via these methods, but your stylesheet may be uploaded to Twilio Assets for use here.
The following NPM packages are defined as external dependencies:
react
react-dom
redux
react-redux
When you build
your plugin, these dependencies will not be included in your bundle. Instead, Flex UI will provide them as global for your plugin to use.
To ensure you are using the same version that Flex UI is exposing, leave the version of the React that is specified in your package.json
. See React Versions to see the currently supported version.
We currently support the following versions:
react 16.5.2
react-dom 16.5.2
redux 3.7.2
react-redux 5.1.0
Make sure to follow the instructions in the main repository to set up the project.
# Install dependencies and link local packages with each other
cd packages/flex-plugin-scripts
npx lerna bootstrap
# Run tests
npm test
# To use your local package in a different project
npm link
# then in a different project
npm link flex-plugin-scripts
Thank you to all the lovely contributors to this project. Please check the main repository to see all contributors.
FAQs
Runtime for Flex plugins
The npm package @twilio/flex-plugin receives a total of 4,648 weekly downloads. As such, @twilio/flex-plugin popularity was classified as popular.
We found that @twilio/flex-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.