typescript Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
TypeScript's type system makes it very easy to add types as per our requirements. But most of the time, we may need to perform some transformations on existing types to get resultant type as per our requirements instead of adding a new one. Some common type transformations may include: Extraction of types Exclusion/Inclusion of types Setting types to required/optional Utility Types provided by TypeScript help in performing such type transformations. Utility Types are built-in and globally accessible functions available in TypeScript. Under the hood, they make use of Generics extensively. Some frequently used Utility Types are as follows:
Recently we have introduced a live streaming feature in our application. For that, we have used a JW player as it is easy to show youtube videos first and then streaming live events. We have also implemented a feature for an alternate player option for the end-user if there is any streaming issue. For that, we have used Flow player as it is lightweight and powerful. So we have JW Player as the default player and Flow player as an alternative. We have integrated the JW player library into our application from here and the flow player library from here.
In this tutorial we will setup react native web app locally and deploy on Render. Before we start with the react-native-web setup, I assume that you have installed Node.js, Yarn and react-native-cli on your machine. 1. Setup React Native App with TypescriptTo create react native app you need to run following command react-native init ReactNativeWebApp This command will create react native app and your app directory will look like as shown in the following image (image 1.1) image 1.1: Project rootTo add typescript to our app first we need to install react-native-typescript-transformer yarn add --dev react-native-typescript-transformer typescript