flex-ui-sample
flex-ui-sample copied to clipboard
Where to instantiate a flex plugin in this sample?
Hello,
I've brought in a custom component developed separately into this UI. How do we load it up?
In the plugin source code, it was doing:
import * as FlexPlugin from 'flex-plugin';
import RlPlugin from './RlPlugin';
FlexPlugin.loadPlugin(RlPlugin);
However, when trying to do this inside of the index.js file, if I place it at the top of the code, nothing happens. It's supposed to be modifying the CRM container.
In case anyone else is trying to figure out how to build and integrate their plugins with this Flex UI sample directly - you don't. Plugins should still be deployed to Twilio like you were deploying to their hosted Flex UI service. It looks like the plugins are then pulled dynamically into your self hosted sample when it is run on startup. The Flex UI and your plugins are not built and bundled together before deploying.
This is unclear in their documentation and I spent a bit of time figuring this out.
@cfu288 I don't get the idea of this repo. I guess that this sample's a new way to load plugins in Flex UI v2.
If you are looking to understand how to add plugins, I recommend looking into this repo: https://github.com/twilio-professional-services/flex-project-template. They have a set of useful plugins and also a framework for adding your own. I've followed this for my companies project and it's worked well.