How to create a real life-like 3D avatar with react-native? - react-native

This question can sound a bit off-topic or more of tech capacity or capability. Let's say I am pretty new to this whole thing. I recently came across with https://avatarsdk.com and http://tada-time.com and really got curious how they are doing it. Let's say I want to use a real life-like 3D avatar in a react native app, any ideas where to start with? How do I create an avatar in React Native app?
I am well aware of there are API we can pay and use it.
Any help would be appreciated.

I guess what your requirement is to create 3D objects for Augmented reality, if I am correct. Currently Apple and Android provides their own framework for that. IOS's AR kit and android's AR Core is a bit different in terms of code structure(I mean how they approach problems, their functionality etc). I'll consider them a bit advance topic better done on native platforms. Answering your question, I haven't come across any such library in react native and I don't think we'll see any soon as react native is still maturing and still has a lot to do to become stable.
I've seen projects in react native having AR elements, but that was done entirely in native and bridged to react native (hybrid)

Related

What is the best solution for Local Notifications in IOS for react native?

As the React Native website informs us PushNotificationsIOS is now deprecated. What is recommended is using https://github.com/react-native-community/react-native-push-notification-ios. However, this project does not seem to be maintained or commonly utilized. Frustratingly, it lacks Typescript support.
I am having problems using a Notification Content Extention for some nice custom iOS notifications. I suspect this has something to do with react-native-push-notification-ios's use of now deprecated UILocalNotification. Like many projects in the elephant graveyard that is the RN ecosystem, it seems painfully out of date. I'm reluctant to further troubleshoot my issues because it seems like a lonely, time consuming and potentially fruitless effort. Additionally, I'm trying to avoid writing a lot of native code.
Is there a solution I am missing here? Or am I asking for too much native support from React Native?
I always use firebase for my notifications. It works really well in my opinion. https://rnfirebase.io/docs/v5.x.x/notifications/introduction

What actions you have taken after you hear about React Native Architecture Changing and Airbnb, Udacity abandon it?

This is not a technical question.
It just this is my first programming language which I am fluent and I don't want to abandon it. But I feel frustrated, I need to know about this framework, but should I learn something that will change in just a couple more weeks.
News:
https://adtmag.com/articles/2018/07/10/abandon-react-native.aspx
https://www.theregister.co.uk/2018/07/26/node_native_developers/
Few things from my perspective: Airbnb was supporting React Native since 2016, and recently they announced sunsetting React Native and reinvesting all of their efforts back into native because they weren’t able to achieve their specific goals. The reason why AirBnB is moving away from React Native is very specific to Airbnb. They already have a huge number of IOS & Android Developers and feel their application needs are pretty unconventional. They end up developing for 3 platforms instead of 2. Which means their entire application is not in React Native, only a few features are in React Native.
Read these articles: https://medium.com/braus-blog/airbnb-is-dropping-react-js-should-you-too-dcbff36def5c and Here goes what worked well and what didn’t : https://medium.com/airbnb-engineering/react-native-at-airbnb-the-technology-dafd0b43838 . And one head's up from the RN team after the .56 version release is "
We're working on a large-scale rearchitecture of React Native to make
the framework more flexible and integrate better with native
infrastructure in hybrid JavaScript/native apps. With this project,
we'll apply what we've learned over the last 5 years and incrementally
bring our architecture to a more modern one. We're rewriting many of
React Native's internals, but most of the changes are under the hood:
existing React Native apps will continue to work with few or no
changes."
Facebook has not stopped supporting React, and there are still a lot of contributors supporting and using React Native in the community. Moving away from technology depends on what are the other alternatives you have.

Is React Native suitable for building an OpenGL-accelerated 2D-game?

Say I wanted to build something like a 2D side-scroller game. Would React Native be suitable performance-wise? E.g., can I use OpenGL-acceleration for it? Or would it probably be slower than just using WebGL and HTML5?
Researched some more and came up with this information:
Apparently there is a GLView which holds a WebGL context:
https://docs.expo.io/versions/latest/sdk/gl-view.html
On that page it says this:
Any WebGL-supporting library that expects a WebGLRenderingContext
could be used. Some times such libraries assume a web JavaScript
context (such as assuming document). Usually this is for resource
loading or event handling, with the main rendering logic still only
using pure WebGL. So these libraries can usually still be used with a
couple workarounds. The Expo-specific integrations above include
workarounds for some popular libraries.
Also a Twitter comment from Expo which mentions 'games' specifically:
Expo Graphics gives you the power of GL combined with Expo+React Native. It
is the foundation for image filters, games, and special effects.
And there should be a demo here:
https://github.com/gre/gl-react
Not much projects listed there which use React Native to build a game. Still, there being a WebGL context interface to a native OpenGL acceleration gives rise to hope.
I've used react-native-webgl to build a minesweeper game. This library has provided the performance gain I needed to render a 16x30 grid of cells with quick transitions from one state to another. In some circumstances the game needs to re-render dozens or even hundreds of cells at once. Default React Native renderer is not fast enough to do that without user noticing the delay.
Note that while react-native-webgl solves the performance problem, it requires you to write low level code such as creating shaders, manage the vertices etc. And I haven't found libraries built on top of react-native-webgl that would work for my task.
So if you really need or want to use React Native for your game, use react-native-webgl or GLView for Expo. Otherwise use a different technology like Unity.
You can find the source code of my game here.

Should I create my ReactNative App with Redux?

I starting to learn ReactNative to develop Android and iOS Applications. Before that I programming Mobile-Applications with Java and Swift.
The last weeks I search a lot in the web to get experience from other developer that use ReactNative or other "Cross-Platform-Frameworks". Early I hear about Redux and that many developer use it.
I programming some examples in Redux to understand the concept, I have understood something but not quite everything.
So I come to my main question, is it better to programming a ReactNative App for both platforms with Redux ? What are the pros and cons ? And it is better for a beginner to start with ReactNative without Redux ?
Hopefully anyone can answer my question and share his experience, so I understand Redux better.
I'd say first get a good understanding of how React works and read about React best practices because thats what React Native uses to compose hierarchy of native views in React native app.
For a simple app you don't have to use Redux.You can always add it later.
https://blog.tighten.co/you-might-not-need-redux

React Native vs Swift/Objective-C/Java Native

I'm working on a new project for a Fintech company and I have been tasked with looking into whether we should go with React Native or native Swift/Objective-C/Java for our mobile app development technology and strategy going forward.
I have done loads of research into this and have read many of the case studies relating to React Native, but I still don't feel I have enough to make an informed decision at this point.
The broad app functionality will include things like:
Data related functions such as Account Balances and Statements (pretty simple)
Image capture of identity documents and selfies of the users
Capture of biometric data
Push notifications
Some of this is pretty standard and simple, but some of it will require the app to use low level device functions and/or use 3rd party Android and iOS SDKs.
So, in terms of working towards the decision of a mobile development strategy, can I ask you for your input, based on your recent experience, on reasons to consider React Native over native Swift/Objective-C/Java development in the light of the planned functionality listed above (including reasons why it may be far better to stick with the native languages/platforms).
From own experience I can tell that React Native is a good choice for most of the apps when you need to develop and iterate fast. It usually means it would be cheaper to develop for a customer.
Looking at the list of features I can not see anything that can not be done in RN. Sooner or later you'll have to dive into native code, usually to bridge native modules with JS. I've done this multiple times, it's not that hard and documentation on RN website helps a lot.
Be aware that you'll most certainly run into stupid bugs and you'll have to find workaround. At least this happened to me multiple times when I was building RN app half a year ago, maybe now it's more stable.
Also I believe it really depends on what are the devices of potential app users. I've never developed for Android, but heard from fellow developers, that on mid-level Android devices RN runs much slower, this should be tested from the very beginning.
React Native has a really nice and tempting idea behind sounds like "unified and almost fully shareable codebase for different platforms including Web". But from my experience (not so extensive but still) the reality is a little bit different – at some point you will face some issues with native code for sure, and it would be really good if you have experienced Swift/Objective-C/Java developers in your team to deal with it. Don't trust the promises "all you need is just a React Front-End Developer". The React Native platform itself seemed to me more like a magical blackbox which I ran with a single command having no any idea what's inside and how it actually works. You have to know at least something about Xcode and Android Emulator even if Facebook is trying to hide this aspect it from you as much as they can.
TL;DR In my opinion if you really want to try React Native for something more complex than TodoMVC then you need to have at least 3 developers: Web (JavaScript/React), iOS (Swift/Objective-C) and Android (Java). Or just one Superhero.