When a React Native project starts to grow, it can be wise to set up end-to-end tests. One of the solution that you can choose to achieve this is Detox.

Detox is a great tool to test the UI of your application but there are some situations where you will need to simulate the behavior of your application. This is what we call a mock.

In my case, the application I’m developing uses the react-native-image-picker library which allows, among other things, a user to pick an image from the files in his/her phone or to take a picture with his/her…


Introduction

This story is for people:

  • Who use React and have video display need
  • Who has several videos, but only one to be displayed depending on an external setting
  • Who wish to dynamically set up their video source
  • Who wish to load only the corresponding file

In this story, we won’t show you how to create a React project from scratch, but we will address the problem directly.

If you want to implement this solution but you don’t have a React project yet or you are just starting in React, we strongly suggest you to consult the official documentation : https://create-react-app.dev/docs/getting-started

Setting the scene and solving the problem


Many developers have probably struggled with this issue: How to properly manage nested ScrollViews in React Native ?

While the official documentation says that the nested scrolling is managed by default in IOS and that it is simply necessary to set a props (nestedScrollEnabled) for Android, the reality is sometimes different.
Having myself encountered this problem, I propose in this article a way to manage nested ScrollViews in the same way for both IOS and Android devices.

To do this, we will start with a new React Native project that will be used as a basis for example. …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store