Integrate WebToNative SDK into Your Base 44 React App

Author:

WebToNative

11 November, 2025

When a user develops a website on Base44, a no-code website builder, the user is able to create a fully functioning React-based site with minimal writing of code. With the website converted into an Android or iOS mobile application using the WebToNative platform, the same user can then convert their website to either an Android or iOS mobile app. But to gain access to native device capabilities such as social login, biometric authentication, or deep linking, the user should install the WebToNative (WTN) SDK into their React app. This integration connects the web application and mobile device capacities, making its application native to the user experience.

In this blog, we will guide you through the step-by-step integration of the WebToNative SDK into your Base44 React App to power up your mobile app’s complete potential.


Why Embed WebToNative SDK?

WebToNative is easy to use to create a mobile app out of your Base44 website. Still, without the SDK, your app will simply be your site on a mobile app, which can display content, buttons and pages, but is unable to interact with native features such as social login, fingerprint authentication, push notifications, or deep linking.

  • Enable deep linking in the app, which allows users to open particular screens or sections immediately by clicking on the links or notifications.

  • Enhances app performance that ensures quick loading speed, a smooth transition, and a more reactive interface.

  • Provides an effortlessly native user experience, creating the impression of a real mobile app rather than just a website.

  • Scalable in the future, as you can add new native features and functionality to your app as it scales.

  • Enhances the security of apps through the support of the secure authentication procedure, improving the safeguarding of user data.


Steps to Integrate WebToNative SDK into Your Base44 React App

Setup Requirements

  • A Base44 account with a paid plan (editing of code is not under the free plan).

  • Your app cloned from a template or developed from scratch.

  • Familiarity with the functionality of the Base44 platform.

Step 1: Open Your Base44 App

  • Go to base44.com and log in.

  • On the left sidebar, click on Apps to scroll through all your apps.

  • Choose an app (e.g., a template of TaskFlow, which you have cloned). There will be a card with the name of your app, description, and date of creation.

Step 1.png

Step 2: Access the Code Editor

  • With your app open, in the top navigation bar or sidebar, look for the Code Icon, which will look like </> or a code bracket.

  • Click on it to open the code view.

  • In the Code Panel, click on See all Codes or See all Files to expand the entire file structure, such as pages, components, and entities.

Step 2.png

Note: In case you are editing the code under the free plan, you will be directed to the paid plan. Update your plan and restart.


Step 3: Find and make changes to the Root Layout File.

  • In the left panel, you will see the File Tree. You have to expand the pages or the root file if it is flattened.

  • Click on layout.js or Layout.js. This is your main layout file, often at the project root, where you can add the scripts and make sure that they will run in all cases.

  • It should look like a file with imports from React and other components.

  • The layout.js content will be displayed in the Code Editor (right panel). Move to the bottom, which is the last open brace }, before the statement that is the export statement.

Step 3.png

Step 4: Insert WebToNative (WTN) Script Snippet.

  • Insert the following snippet given below at the end of the file within the main function (after any existing useEffect or logic, but before the return statement).

  • In case there is no useEffect, then add it immediately after the declaration of the functions.

  ```javascript
   import { useEffect } from 'react';  // Add this import at the top if it's not already there
   import { useEffect } from 'react';  // Add this import at the top if it's not already there

   // ... (rest of your existing code)

   export default function Layout({ children, currentPageName }) {
     // ... (any existing useEffect or logic here)

     useEffect(() => {
       (function() {
         // WebToNative SDK URL
         const SDK_URL = "https://unpkg.com/webtonative@1.0.77/webtonative.min.js";

The SDK URL in the useEffect snippet points to version 1.0.77. Always check the WebToNative Documentation for the latest version and replace the URL (e.g., update @1.0.77 to the newest tag) before pasting, ensuring compatibility and security.

         // Idempotent loading - does not load if it already exists
         if (document.getElementById("wtn-sdk")) {
           console.log('[WTN] ???? SDK already loaded');
           return;
         }
         
         const script = document.createElement("script");
         script.id = "wtn-sdk";
         script.src = SDK_URL;
         script.async = true;
         
         script.onload = function() {
           console.log('[WTN] ✅ SDK loaded successfully!');
           
           if (window.WTN) {
             console.log('[WTN] ⚙️ SDK initialized');
           }
         };
         
         script.onerror = function() {
           console.warn('[WTN] ⚠️ Failed to load SDK (normal in web browser)');
         };
         
         document.head.appendChild(script);
       })();
     }, []);

     // ... (your return statement and closing brace)
   }

Quick Tips

  • Copy the above snippet exactly.

  • In case there is already an import of useEffect, then do not include it.

  • Make sure it is appropriately indented for your file format.

  • Save the file (Base44 will save automatically, but in case it prompts, save your file).


Step 5: Preview and Test Your App.

  • On the top bar, click on Preview to see your app function.

  • Open your browser's Developer Tools (right-click > Inspect > Console tab) to check for logs like `[WTN], SDK loaded successfully!. This confirms it's working.


Step 6: Publish Your Changes

  • Finally, when you are just done with your changes, click Publish in the upper right side to make the updates live.

  • Share your app link to testers or export (e.g., ZIP, GitHub, or through the beta features).


Next Steps

  • Explore WTN Options: Once you have made the integration, embark on using the window.WTN within your own code for native calls (e.g. WTN.openUrl(‘https://example.com’)).

  • Customise: It is possible that your app has a different layout file, so add the script there.


For Advanced Integrations, Visit.


The WebToNative SDK is easy to add to your Base44 React application and is an effective method of enabling native, mobile capabilities, better performance, and performance. It takes only a few steps to take your app beyond a simple web wrapper, which supports deep linking, increased security and scalability in the future. It is with this integration that your Base44 app will really fill the gap between web and mobile, providing an experience to the users that is faster, responsive, and has a fully native feel to users.

Similar Blogs