Skip to content

Migration from React Native WebView API

Use this guide when your React Native application still uses the deprecated LIQA WebView v3 API and you want to move users to the current LIQA web component inside WebView integration.

The main client impact is a newer embedded UI, optional image upload, current WebView guidance, and a structured event model. The technical migration focuses on creating the LIQA HTML page, loading it inside the React Native WebView, and forwarding capture/error events to native application logic.

Versions Comparison Summary

Featureprevious (WebView v3)current (web component v6)
Delivery methodCDNCDN
Integration methodWebViewWebView
Image format by defaultbase64blob
User Interfaceincluded, old designincluded, new design
Option to upload image from device gallerynoyes, optional

Migration Steps

WARNING

We recommend fully removing the previous LIQA version integration from your application code before starting.

  1. Start by reading the new scheme of LIQA integration into mobile applications
  2. Implement the HTML page with LIQA web component and host it locally or on CDN.
  3. Implement the React Native WebView component in your application.
  4. If your application allows users to upload images from device gallery, allow this option in new LIQA by default and remove this feature from your application code.
  5. Customize the LIQA interface style and texts. See UI styling and texts replacement documentation pages.
  6. Add error handling logic and forward the caught errors to the React Native application from WebView.
  7. Check our recent updates regularly on the What's new? page.

Features Compatibility Notes

Cache LIQA content

The previous version offered a way to cache LIQA content by setting cacheEnabled={true} in WebView component. The current version (v6) does not support this feature and we recommend to remove it from your code.

Change appearance

The previous version offered a way to change selected colors by passing a "style" dictionary object via webView.current.injectJavaScript('window.postMessage. The current version (v6) supports inline CSS styles or external CSS stylesheets, provided from HTML page via styles API. Check more on UI styling documentation page.

Catch events and errors

The previous version offered a way to receive a limited list of events and errors by subscribing to event.nativeEvent.data observable via onMessage. The current version (v6) offers more verbose and structured API to catch events and errors for HTML page, see LIQA Event Map documentation page.

  • Please, note that events structure and error codes have changed.
  • Please, forward the caught errors to the React Native application from WebView.

Exit LIQA session

The previous version (v3) offered a way to exit LIQA iframe by injecting "Exit" command via webView.current.injectJavaScript('window.postMessage({Exit: ""})');. The current version (v6) does not support this feature.