Customize and change the default UI of pdftron - reactNative - react-native

My question is does pdftron give react native developpers some alternatives to change the whole ui?
As an example, i want to create a bottomTab to control the annotations and other things.
is it possible to do it without touching the java and swift code ?

you can create your own custom UI and use the set tool API in the PDFTron library. This allows the developer to set what tool mode is currently being used. You can also hide existing toolbars by using the available api’s.
Please see https://github.com/PDFTron/pdftron-react-native/blob/master/API.md#settoolmode for more information.

Related

How to add custom dynamic theming in ant design

I want to change the theme of my entire application based on the theme coming from API.
My current implementation:
I used these steps mentioned in Antd Docs which works perfectly for a static custom theme. ( For any change made in the config the server has to be re-run )
This would not fit my current requirement as the app can't be stopped and re-run.
Antd supports dynamic theming
You can follow the official Antd Docs to implement this.
Here is a simple codesandbox to get started.
However if you choose to not to go with experimental approach there is an another way to implement dynamic theming using a plugin.
Check this simple guide to get started
Note: This project is not maintained actively. Use this with caution.

Is there a way to turn an app into a website in React Native?

I built an application in React, is there a way that the same code will be used for a website?
I know Instagram is built on React and it also has a website, I wonder maybe you should add some link or something that it will open for me as a website?
Or maybe there is no such way and I have to build a website separately?
First off all, If you have written any code which is related to native functionality, then it can be challenging.
If you have only worked with views, images, and some of the basic functionality.
It can be done with react-native-web you can easily migrate your project to react-native-web.
If you project is created with expo they already provide react-native-web support.
Option 2: If you have some of the code you want to share and some is that you don't want to share or can't share.
You can use renderProp or customHooks pattern to reuse your logical code and seperate your view for react-native and react js apps.
If you want to reuse your views too, you can do those with primitives.
you can use styled-component primitives for that.
https://medium.com/react-native-training/sharing-code-between-react-web-and-react-native-applications-7f451af26378
You can get some idea here as well.

Different UI for Android/iOS in interpreted JS cross-platform tools

Some cross-platform tools (like Xamarin native and RubyMotion) allow the development of two separate views for Android and iOS, while keeping the business logic shared for both of them. Others (like Apache Cordova or Xamarin.Forms) share both UI and business layer, with the option to use platform-specific overrides when necessary.
What is the state of the interpreted JavaScript frameworks (NativeScript, React Native or Appcelerator)? Are they all focused on creating single UI with platform overrides, or do they allow creating two separate views for each platform? For example, is it possible to create a view using Fragments in Android, but a different view on iOS (since Fragments do not exist there)?
Cordova uses WebView, that mean GUI level will be the same for both Android and iOS but different per Device version. In case of Android each client has own Chronium version and it can break UI behaviour. So developers use Crosswalk to set fixed Chronium version. (extra 20M to your application).
BTW Ionic that uses Cordova architecture uses native behaviour per platform. For example for Android Tabs located at the top, on iOS - at the bottom
On other hand Xamarin (C#), React-Native(JS) and NativeScript(JS) call native APIs. They don't use WebView but generate Native code.
For example if you create button - it will look different: on Android - material theme, on iOS - iPhone theme
Anyways, the bottom line is: everything depends on resources and time. If you want to build application fast, with the same view - I would go on Ionic2+ Angular2 + Cordova.
If you you have more time - go on React-Native or NativeScript (Still has poor documentation) or Xamarin (C#).
React-native's slogan is Learn once, write everywhere. So, you can choose what suits your needs, you can:
Share UI between platforms.
Share Only business logic.
So, the answer for react-native is yes. You can create separate UIs or you can share it.
Since you are writing components, one way of separating this logic is to write component.android.js and component.ios.js and the platform loads the appropriate one for you. Note that you can also do that programmatically.
You can see that in action in the official f8 app made by facebook using react-native

React Native Dynamically load modules/plugins?

As far as I've searched it appears to be impossible to load modules (=plugins/libraries?) dynamically (I'm very new to React Native..).
What I'd like to accomplish is to let the user of the app load additional functions as she/he desires.
Example:
A user wants to add a music plugin to the app.
Intuitively, I'd long for something like dynamic library loading. The user would fetch the library, it'll be loaded into the code and can then be executed. However, in React Native it seems like there are only modules that can be loaded?
Alternatively, I'd hope that auto-updating the app would allow to add modules "on-the-fly" ( https://github.com/aerofs/react-native-auto-updater or www.npmjs.com/package/react-native-hot-load ). But I fear that this is only for JS and data content?
The ability to dynamically add functionality to the app is an essential part of the app. I have no previous experience worth mentioning in mobile app development.
Question: Is it possible to dynamically add functionality (also native in nature) to React Native apps?
If not, would there be a workaround?
EDIT: I have found the following repository on github: https://github.com/yusefnapora/react-dynamic-linking-example .
Unfortunately, without any description. I have no idea about Objective-C, but the repo name sounds promising. Anybody knows what its purpose is?

How do you enable Core Spotlight to index app content in React Native

What's the easiest way to go about indexing a React Native app so that content within the app appears in Spotlight searches?
If you're still interested in indexing your app content using React Native, I've written a plugin to do just that.
As you've figured out, there's no built-in react-native support for this. The only option for you to utilize the Core Spotlight framework capabilities is to create your own native module which will expose this functionality to your react-native code. You can also try to find someone who already wrote this module and made it open source, but I guess you've already tried that.
Since this is the only way, it is also the easiest... That said, it should be pretty easy to implement it yourself, assuming you have some experience with iOS development. If you run into problems you can post your code and I can point you in the right direction if necessary.