[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Current behavior
I'm trying to make it work with lit (web components).
I made one change in the source code to make it compile:
in index.js I've changed
return new PCancelable__default((resolve, reject) => {
to
return new Promise((resolve, reject) => {
Without it I will get
PCancelable__default is not a constructor
Expected behavior
I would love to know if there is any specific reason to not use Promise in this case. Because with the promise, it is possible to make it work with lit.
Minimal reproduction of the problem with instructions
Replace package.json content with the content from package.txt
Replace home-element.ts content with the content from home-element.txt
Replace PCancelable__default in node_modules/reaflow/dist/index.js with Promise
What is the motivation / use case for changing the behavior?
I would love to use this library in my web component project, there are no good enough alternatives to this lib.
Environment
Libs:
- react-dom version: 18.2.0
- reaflow version: 5.0.7
Browser:
- [x] Chrome (desktop) version 106
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
I'm submitting a...
Current behavior
I'm trying to make it work with lit (web components). I made one change in the source code to make it compile:
in
index.js
I've changedto
Without it I will get
Expected behavior
I would love to know if there is any specific reason to not use Promise in this case. Because with the promise, it is possible to make it work with lit.
Minimal reproduction of the problem with instructions
package.json
content with the content from package.txthome-element.ts
content with the content from home-element.txtPCancelable__default
innode_modules/reaflow/dist/index.js
withPromise
What is the motivation / use case for changing the behavior?
I would love to use this library in my web component project, there are no good enough alternatives to this lib.
Environment