Usage in web-components environment
K4CZP3R opened this issue · comments
I'm submitting a...
[ ] 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
- Clone lit boilerplate
- 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
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
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: