For better developer experience always prefer an explicit pattern.
There is an overhead with understanding implicit code. It implies that you know a contextual knowledge not written in front of you.
// will it throw? Idk
An alternative to make the error handling of a throwable function explicit is to request the user to pass an error callback.
type SomeFunction = (onError: (err) => void, onSuccess: (res) => void) => void;
Another alternative is to…
In order to simplify dependency management, code reuse, and collaboration across teams, many projects have sought out to use the Monorepo structure. This post will outline how to achieve a Monorepo folder structure using React Native You.I alongside Yarn Workspaces.
Things this post covers:
Our goal is to have two apps in the same repository, and allow these two apps to use the same modules inside a directory named
shared . We also want to be able to run tests separately for each app.
In the world of cross-platform, it is common for the need to create bridges of communication between different languages. While working with React Native and iOS, I stumbled on a need to interop with a C++ class. This post covers how you can communicate between Objective-C and C++ code.
You can transform your Objective-C file (.m) to Objective-C++ (.mm). This by default enables you to call any C++ code in your Objective-C++ file.
#include “SomePrivateCppClass.h”@implementation MyObjective_c_file
- (instancetype) init
// Add your logic here
Note - Sometimes you can have issues with this approach…
I’ve talked before about You.i Engine One saving hours of development time when building across platforms. Today, I want to talk about another use case of You.i Engine and that is leveraging component reusability on any form factor (mobile, tablet, or TV).
You.i Engine One’s Designer Workflow allows designers to create user interfaces in Adobe After Effects (AE) and then seamlessly pass off their concepts to developers. The UIs render directly to the platform through component references provided by Engine One. UIs can also be created using JSX thanks to You.i Engine’s React Native bridge.
As a developer, we are like artists, we take pride in the code we write. Have you ever spent a significant number of hours, working on a feature, taking careful steps to test it and validate its functionality? If yes, then someone might have also told you to change it, if not completely at least partially. Well, I have been in that situation. Despite a few years of experience, the stress and emotional barrier generated by this change is always enormous.
How to deal with this? It is unquestionable how hard it is to deal with this emotion, the feeling…
When specifying the behavior of a data structure component, there are often two concerns that need to be dealt with: basic functionality and support for data integrity. A data structure component is often easier to use if these two concerns are divided as much as possible into separate sets of client functions.²
Data colocation has been part of React since the beginning. From the early days until now, Component State has always been a way to colocate data with components. GraphQL Clients also pushed on this idea, Relay, for example, has a Fragment Container plus data masking approach, each component…
Originally posted on https://www.youi.tv/react-native-video-interface-12-platforms/
When You.i TV approached G2i to help build a streaming video app using their You.i Engine One SDK, I was a bit worried. One, we as a company had never built a streaming app before so I knew we’d run into unique challenges. Two, the list of target platforms was broad; handsets, tablets, and TV devices. Three, React Native was to be the main framework.
I have been part of several React Native projects targeting handsets and tablets, but I’ve never had to deal with TV-connected devices. …
A maior conferência de React da América Latina reuniu, em seu segundo ano, grandes referências do cenário brasileiro em React. Resumi aqui tudo o que aconteceu.
A React Conf Brasil obteve um número impressionante este ano, foram 600 ingressos vendidos e lista de espera para desistências. O evento ocorreu no dia 20 de outubro no Teatro Brigadeiro na Capital Paulista. Houveram várias empresas participando e patrocinando. Foi um local com muito networking e desenvolvedores de todo o Brasil.
The second year of the biggest conference of React in Latin America gathered big names of the Brazilian React scene. This is a summary of everything that happened.
React Conf Brazil had impressive numbers this year, with 600 sold tickets and a waiting list. The event happened on October 20th, at Teatro Brigadeiro São Paulo. Many companies participated and sponsored the event. It was a great place to network with developers from all over Brazil.
React introduces a component model to compose your UI. There are a couple of ways of rendering a component/JSX. You can use these simples rules to determine which way to write your component.
Note: This is a follow up article based on youtube screencast I made. check it out if you prefer watching. https://youtu.be/tIK8ndsC4SE
It's possible to write components using classes or functions. When using classes what we do is extend either React's Component or PureComponent.
Both Component and PureComponent gives us access to React's state handler and lifecycles. …