Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Let's get down to business! To make the integration process as simple as possible, we're going to write a JavaScript SDK. We're going to create a library for interacting web applications with a native application and publish it on npm. After some tweaking, I generated a typescript project using vite and created a message.ts file. The file contains, for the beginning, 4 methods (The necessary imports and missing parts of code can be found on the Github repository and the JS SDK can be easily installed via npm.):
Now we need to create an application that can subscribe and send messages. To accomplish this, we will generate a React Native project and create the necessary component:
We're creating a frontend project using the famous Create-React-App. And what's the best way to start? By creating an empty react project, of course! Let's create a component:
Related posts
- Mastering React Interview: Top Common Questions and Best Practices
- Installing React 18
- A detailed guide on how to implement Server-side Rendering (SSR) in a NextJs Application
- Client-side and Server-side Rendering: An Overview
- Fastest (simplest?) front end stack for a back end developer to build a portfolio?