Questions tagged [ionic-react]

The ReactJS version of the Ionic cross platform mobile application development framework.

240 questions
0
votes
2 answers

How do I read from local storage in Ionic React?

I'm new to React and Ionic as well as JS in general so I've followed the tutorial and tried to adapt it to my use case. What I want to achieve is the following: read a JSON string from local storage when the app loads write the (newer) JSON back to…
traxx2012
  • 394
  • 2
  • 16
0
votes
1 answer

When I click on Tab more than once the back button works incorrectly

I'm coding a mobile app with ionic react and it's almost done. But I found a bug like this. While testing the app on my Android device, I do something like this and there is something wrong here. I clicked on the homepage tab and went to the…
Berat Bozkurt
  • 111
  • 4
  • 13
0
votes
1 answer

Why socket.io does not work further on react components after I remove all listeners in another component?

After weeks of debugging and having to implement an awful workaround to get my react app working, I just figured out the issue and as a beginner with react, this just confused me so I'm posting this question to hear your suggestions. I have a react…
basilisk
  • 1,156
  • 1
  • 14
  • 34
0
votes
1 answer

How to display arrays as Jsx elements in reactjs

There is this users array in which the user names are stored in the photo are split from the photo array and i want to display the array results as buttons are displayed . The code snippet is below let users: string[] = []; const setUserNames =…
KUSHAD
  • 127
  • 1
  • 2
  • 8
0
votes
1 answer

Can't create dynamic IonIcons in ionic-react project

i am using many components in my project and in all those components need different different ionIcon for each component. So i created Icon component. Icon name passed from each parent components to the Icon child component. But its not…
Eann
  • 83
  • 2
  • 12
0
votes
1 answer

Cannot set background Image in IonCard Ionic4- React

I am not able to set background image in my ioncard component . Here is my code {allCategories.categories.map((item, index) => { return (
Ratnabh kumar rai
  • 1,426
  • 4
  • 21
  • 48
0
votes
1 answer

usereducer won't update state

I am very new to React and come across useReducer. If I paste my code here, it will be very long, because it involve component, useContext and useReducer.So I will paste some of the code only. I have question about the state in try and catch…
user2601660
  • 29
  • 10
0
votes
1 answer

ionic 5 - How to use ionic search bar to search on server only when user presses enter / confirms the search

I am using ionic 5 to build an app and I would like to have a search bar to search and show results from a server. When looking on the documentation (https://ionicframework.com/docs/api/searchbar), it seems that this element is designed with local…
0
votes
1 answer

Problem with document scanner plugin: extra dependencies add on time of build

I have a problem with the ionic react document scanner, as I build the app in some file extra dependency adds into that file and I have to remove that dependency to make application workable, otherwise, it won’t work. Here is the path of extra…
0
votes
1 answer

Routing from an IonCard to an iframe webpage

I've currently got an IonCard setup like this: Card Subtitle Card Title
0
votes
4 answers

How can I override the onclick behavior of IonBackButton

How can I override the onclick behavior of an IonBackButton? I was able to add my own listener but I cannot figure how to prevent the default listener from firing. I plan to warn the user if they have unsaved data.
michaelmesser
  • 3,601
  • 2
  • 19
  • 42
0
votes
2 answers

InAppBrowser not opening in Ionic React App

import { InAppBrowser } from '@ionic-native/in-app-browser'; useEffect(() => { const browser = InAppBrowser.create('https://ionicframework.com', '_blank'); }, [//deps]) I cannot use the Browser plugin of capacitor as I need to execute a few…
elvis_ferns
  • 524
  • 6
  • 14
0
votes
1 answer

How to pass props to tab in Ionic React

I'm trying to pass an array to a tab as a prop, but I am getting a confusing error. Here is the code: ()} /> />
0
votes
2 answers

Not able to render state variable after setting state in useEffect

I have an ionic react app in which I want to show data from a database when the application opens, however the values are only displayed after I navigate to another tab then back to the original one. I will be adding to the database and want the…
0
votes
1 answer

How to prevent 'UIColor' has no member 'systemBackground' ` and 'UIStatusBarStyle' has no member 'darkContent' in ionic/react v5 for ios?

Writing a simple app, no plugins (yet) with Ionic react v 5.3.0 After ionic build, Xcode reports swift build error: Type 'UIStatusBarStyle' has no member 'darkContent' ios This happens with swift v 4.2 and swift v 5, ios deployment target 8, 9, 10,…
rakitin
  • 1,943
  • 6
  • 25
  • 51