Skip to content

Migration from React Native Webview API

This page is designed to help clients migrate from deprecated older version of LIQA to the current one. This page contains information for clients, utilising LIQA React Native v3 API, described in previous documentation.

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 to fully remove previous LIQA version integration from the code of your application before start.

  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 do not forget to forward the catched 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

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

Change appearance

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

Catch events and errors

Previous version offered a way to receive a limited list of events and errors by subscribing to event.nativeEvent.data observable via onMessage. 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 has changed.
  • Please, do not forget to forward the catched errors to the React Native application from webview.

Exit LIQA session

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