0

I want to use RxJs in my LWC. I was successfully able to import RxJs version 5. However, how can I use it with LoadScript. This is my code, it is giving me the following error "of is not a function at eval":


loadScript(this, rxjs +'/rxjs').then(()=>{
  of(1,2,3).pipe(map(x => x + '!!!')))
}).catch((error)=>{
     /* eslint-disable no-undef */ 
   console.log('Files not.: ', rxjs, error);
})

Can someone help with that?

  • Please post all the relevant code. RxJS as a static resource should work. – Kevin Venkiteswaran Sep 29 at 6:12
  • @KevinVenkiteswaran I was able to import RxJs version 5 only. However, the code up there is still not working. I am getting the following error "of is not a function at eval" – Majd Soufan Oct 1 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.