How to get json data in react native from web-view
How to get body content json data in react-native from web-view Hi Developer, are you looking answer to get json data from Web-View to React Native App (State or Variable) i have that issue solution: See this code : import React, { useRef, useState } from 'react'; import { View, Text, Alert } from 'react-native'; import WebView from 'react-native-webview'; const Screen2 = () => { const [content, setContent] = useState(''); const webviewRef = useRef(null); const handleNavigationChange = (navState) => { // console.log('Navigation State Change:', navState); // Check if the WebView has navigated to the specific URL if (navState.url === 'http://ip.jsontest.com/') { // Inject JavaScript to extract JSON data from the response body const script = ` const bodyContent = document.body.textContent; try { const jsonData = JSON.parse(bodyContent); window.ReactNati...