conditional return works in browser, but not on an Android phone?

This issue has been created since 2022-09-21.

Description

Working on a React Native app in Expo, I am encountering a strange problem: everything is fine in browser preview, but on the phone, the conditional return does not happen.


### Version
0.69.6

### Output of `npx react-native info`

info Fetching system and libraries information...
System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (4) x64 Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz
    Memory: 3.67 GB / 7.66 GB
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 17.8.0 - ~/.nvm/versions/node/v17.8.0/bin/node
    Yarn: Not Found
    npm: 8.5.5 - ~/.nvm/versions/node/v17.8.0/bin/npm
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
  Languages:
    Java: 11.0.16 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.5 => 0.69.5 
  npmGlobalPackages:
    *react-native*: Not Found


### Steps to reproduce

1. clone the repository
2. npx expo start
3. open the app on an android phone Expo app
4. click 'next' on the first page (count 0)
5. type in 'August' and click on 'submit' on the second page (count 1)

### Snack, code example, screenshot, or link to a repository

https://github.com/ydrea/rnthegame.git

AGame.js

return (



{search === item.name ? (

) : (

)}


);

ydrea wrote this answer on 2022-09-22

solved it in a roundabout manner...

  //submit query to search
  const handleSubmit = () => {
    searchSet(query);
    //flip the switches
    checkSet(true);
    querySet("");
  };
  //a bit of...
  useEffect(() => {
    //...cleanup for the next one
    checkSet(false);
  }, [count]);
  //
  return (...
<View>
          {!check ? (
            <Text>{count}</Text>
          ) : (
            <View>
              <RCard sculpture={sculpture} />
            </View>
          )}
        </View>
More Details About Repo
Owner Name facebook
Repo Name react-native
Full Name facebook/react-native
Language JavaScript
Created Date 2015-01-09
Updated Date 2022-10-07
Star Count 105180
Watcher Count 3671
Fork Count 22481
Issue Count 2230

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
💡Improving front end performance of MediaPack 2 2022-02-26 2022-07-31
[Right Click Join] doesn't work after latest discord update 3 2022-01-13 2022-10-02
Where to get model_points from? 1 2022-07-18 2022-08-05
unable to open databasefile 1 2018-05-13 2022-10-01
Problem with compute zonal statistics with Dask 1 2021-10-16 2022-09-15
Re-run keeping previous release notes information, not only after 'GetChangesBetweenBuilds' as parameter 1 2022-07-05 2022-08-29
Xplorer2 app window not restoring 3 2022-04-26 2022-09-26
Wrong condition 3 2021-11-23 2022-01-15
[BUG]: App not opening when clicking on the taskbar's icon 7 2022-08-06 2022-09-02
[Bug] Tenshi.moe inconsistent casting 4 2022-03-23 2022-05-24
Start voice chat button on a channel w/o a discussion group 1 2021-01-14 2022-10-06
On Lesson 1, the window does not show up 7 2020-02-05 2021-12-25
使用Github登录后,提示403错误 5 2021-02-09 2022-01-23
MIUI 小白条横屏下addNavigationBarBottomPadding没有生效 0 2021-10-20 2022-06-13
"Quick Filter" misses quotes if INT value selected in VARCHAR column 3 2021-06-08 2022-08-23
[Feature Request]: 希望配置文件能够自定义文件夹位置,而不是系统默认的位置 2 2022-07-25 2022-09-27
svgs get broken 3 2021-02-06 2021-12-26
Team service url is always added to keycloak redirect urls 4 2021-12-09 2022-10-02
Not Working with LadioCast 0 2021-09-20 2022-04-23
Owner can assign same role to someone else, and then cannot demote them 2 2022-09-08 2022-09-24
WebM video rejected with “Video has no video stream” 3 2022-09-13 2022-09-24
[BUG] .bg-opacity-xx class is not functioning at https://preview.tabler.io/ 0 2022-09-20 2022-09-30
[BUG] Dropdown issue on tables 9 2022-09-15 2022-09-30
Compile Issue Ubuntu 20.04 2 2021-07-14 2022-10-05
all repeat controls for primitives 1 2021-08-06 2022-10-04
windows compilation errors 7 2022-06-19 2022-09-23
Unable to pass parameters to configurable areas 8 2022-05-06 2022-09-14
21.10 : Export des fichiers de configuration - Problème 3 2022-03-08 2022-09-26
Unable to save state to localStorage: DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'tempState' exceeded the quota. 3 2022-03-31 2022-10-02
OS parsing issues for iOS, Android, Linux 0 2021-09-25 2022-09-30
Unable to filter on scalar field backed by Lambda Resolver 1 2021-09-23 2022-08-31
Add user id and timestamp to label indices, mutation logs 2 2017-09-01 2022-05-26
[BUG] Entry Point Not Found Exception 7 2021-08-04 2022-10-05
(amd64) JVM crashes on FreeBSD (java/openjdk16) 3 2021-08-21 2022-09-18
netperf_lxip_usb fails on base-seL4/x86_64 0 2022-04-01 2022-06-17
Sculpt: depot preparation fails 9 2022-03-28 2022-09-03
请问可以设置登录配置吗?还有在哪里屏蔽系统按键? 1 2021-08-05 2022-09-29
Minor Wording Issue 0 2021-07-06 2021-12-29
v0.6.8 occurs error: Member PerformanceObserverInit.entryTypes is required and must be an instance of sequence 1 2021-03-03 2022-09-25
Feature proposal: attachment handling 8 2016-09-20 2022-09-16
Text component has memory leak on M1 Silicon 1 2022-02-27 2022-08-28
convert dependencies to peerDependencies 3 2019-07-13 2022-09-30
Customize the color of the bracket pair 2 2021-10-26 2022-07-29
Implement keyspace cardinality for Alphanumeric fields 0 2022-09-29 2022-10-06
Can not set static IP on wired LAN (eth) interface 2 2022-01-06 2022-09-16
Tasmota 10.x Domoticz button disappears, IDX connection is lost 1 2022-01-05 2022-09-17
ESP32 with Tasmota32-Bluetooth let relay switch on and off during cold boot 1 2022-01-07 2022-08-03
Continue fine tuning a model e.g. text-davinci-002 5 2022-03-30 2022-10-05
AWS Region not needed, but Helm chart defaults to us-east-1 2 2022-06-02 2022-09-23
Nu Html Checker (W3C Validator) reports: too few values for the property `linear-gradient` 2 2021-08-31 2022-10-05