If you are seeing the error below when creating custom components in WebViewer, it is probably due to the fact that you are using React Hooks in your component, or using a library that uses React Hooks.
To fix this error, refactor your component to be a class based component rather than a functional component.
Here is an example of a functional component that uses React Hooks:
Here is an example of a class based component that does the same thing:
In WebViewer we use a different instance of React than the one you are using in your app. For hooks to work, the React instance where the hook was declared and where it was rendered must be the same. This is a limitation of React mentioned here: https://react.dev/warnings/invalid-hook-call-warning#duplicate-react
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales