PDF Viewer instance and MOBX

Which product are you using?

PDF.js Express Viewer (Licensed)

PDF.js Express Version

8.7.0

Detailed description of issue
I’m using the React app with the MobX store. To have a viewer control over whole app I was trying to provide viewer instance after initialization to the store. The store for this example would be very simple, just with 1 method to set the instance and receiving next error (sorry for images, can’t upload more than 1 photo):

But I’m not able to enable full API, becaus “fullAPI” is not a valid constuctor option for PDF.js Express. I even don’t need to enable fullApi, just want to pass the instance to the store.

Without passing it to the store, it works perfectly, even though I create a class, based on this instance and pass it up to some component levels. Is there something I’m missing?

Last Note: If store is not auto observable all is working fine, but this solution is useless because components that use store can’t understand that it has received a viewer instance.

Expected behaviour
Be available to pass instance to the store;

Does your issue happen with every document, or just one?
Any document.

Link to document
Can use any document or don’t use them at all.

Hi @azhuravlev,

Is this happening in your local environment or on production?

Best Regards,
Zach Serviss
Platform Support Engineer

Actually on both of them, I didn’t succeed to solve this.

Hi @zserviss, any update on this?

Hi @azhuravlev,

Unfortunately I do not have an update. Could you send me over a sample project so I can debug this?

Best Regards,
Zach Serviss
Platform Support Engineer

Sure, provide me an email address please.

zserviss@apryse.com

Best Regards,
Zach Serviss
Platform Support Engineer

Have sent you an email 20.02.23 with a repository link with the example you asked for. Have you got a chance to look?

Hi @azhuravlev,

I have gotten the repo yes thank you.

I have not been able to figure out the issue yet but will let you know when something is found.

Best Regards,
Zach Serviss
Platform Support Engineer