-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PLUGIN] Extending react code #349
Comments
Any thoughts on this? |
It's always a tough decision to make how far plugins should be allowed to influence the main app. In perspective of potential malicious intents. My policy was that I would like it more if you have some kind of website and send the data you need to there and thus have complete freedom over the UI there. Or export a file and read it from another app. |
Interestingly I came from the opposite direction: I wanted to do an own website, but saw that syncing runes will be a pain (because I want to evaluate runes as they drop). Nevertheless I understand your concerns. Branch route: {
menuItemText: 'Menu Label',
component: () => 'Hello from plugin export'
} Branch routes: [
{
path: '/test_path',
name: 'Menu Label',
component: () => 'Hello from plugin export'
}
] A side of the decision on whether plugins may have multiple routes there are other (minor) decisions to make:
|
If only my simple example would have included a JSX-component like Do you have any idea why this happens? This might be an easy fix, if one understands whats going on. My alternative idea to load the plugin in View.js directly (or rather outsource the loadPlugins-function) leads to the warning 'Critical dependency: the request of a dependency is an expression'. Oddly this causes the entire app to just be blank. |
My guess is that by requiring the global variables over this getGlobal function, the objects are stripped down to an exchangable format, which does not allow a react element to really stay a react element but instead is a json, which react cant render. |
Seems like the alternative of importing the component of the plugins dynamically is not allowed by webpack: (source) |
I am writing a plugin which evaluates all runes of a set of complex rules.
Since I want these rules to be customizable; especially the weigths it would be nice to use the GUI for just that (the normal plugin configs are not suitable unfortunatly).
So my thought was to extend the react dom at the level of routers in View.js.
Is there a way (maybe already) to add a router with a custom react-element which will also show up in the right navigation when initializing a plugin?
Such a possibility would also solve #279 I suppose.
The text was updated successfully, but these errors were encountered: