The ReactJS version of the Ionic cross platform mobile application development framework.
Questions tagged [ionic-react]
240 questions
0
votes
1 answer
how to open modal popup on app load using ionic react
i am using ionic-react and want to launch a modal popup when app is launched. The idea is to create a login popup when app starts. i will dismiss it if user is already logged in else user will login.
my current issue is how to open it…

Moblize IT
- 1,140
- 2
- 18
- 44
0
votes
1 answer
Npm failure for the ionic project creation
ionic start my-app tabs --capacitor
Pick a framework!
Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the
--type option.
? Framework: React
√ Preparing directory .\my-app in…

Sowmyan Soman
- 853
- 1
- 9
- 21
0
votes
1 answer
Ionic-react carousel with ionic slides
In Ionic-React how to create a carousel with ionic slides and want to use it inside the IonList, so the image can be a thumbnail or avatar. I tried changing the CSS but with no luck and also autoplay is not working.
Want to use it purely in ionic so…

ane
- 101
- 3
- 10
0
votes
0 answers
Import react-native libraries in Ionic-React Project
I just trying to work with react-native-svg in my ionic react project and I was able to make it successful with react-native-web. But then if I do import like
import {StyleSheet, View} from 'react-native';
it says
cannot find module…

LVW23
- 85
- 2
- 13
0
votes
1 answer
Ionic + React. Side Menu and Tabs together only default tab is working rest two tabs are coming as blank
I'm using Ionic with React.
In my app, I've both side menu and the tabs together.
In the tabs only the default tab is working properly other tabs are showing a blank screen.
My code is as follows:
1. App.tsx looks as follows
const App: React.FC =…

Ashish Tripathi
- 580
- 4
- 18
0
votes
0 answers
React-Hook-Forms and Ionic - How to submit a form using button outside of the form
How can we trigger form submit outside of the form using react-hook-form and ionic. I believe we can do it using form attribute on the button but Ionic button doesn't allow form attribute on the IonButton
the below code worked in chrome initially…

ane
- 101
- 3
- 10
0
votes
1 answer
Ionic React Typescript with pug.js, 'Uncaught ReferenceError: React is not defined' when use tsx but not jsx
Problem: react-app-rewired start works on App.jsx (and .js too) but not on App.tsx (and .ts too)
Steps
I created a boilerplate app with ionic start my-app blank --type=react --capacitor
on package.json, i replace and reinstall accordingly (remove…

calvindio
- 347
- 3
- 11
0
votes
3 answers
Image not showing in Ionic React
I want to show a .svg image which is in the assets directory in my src directory.
Here is a glimpse of the folder structure -
I want to get the balloons.svg from the Register.tsx.
I am using the IonImg element and have tried directories like…

CubeDev
- 125
- 2
- 9
0
votes
1 answer
Programmatic navigation in Ionic React using ExploreContainer template
I'm using the side menu template from Ionic React, so most of my logic is in ExploreContainer.tsx .
//imports
//some logic
const ExploreContainer: React.FC = ({ name }) => {
switch( name ) { //switch to show content on requested…

traxx2012
- 394
- 2
- 16
0
votes
1 answer
How to add a global component (navigation) in Ionic React
I'm trying to add a global navigation/menu bar component in my Ionic React project, like you would do on any website.
So I've created a standard component i React, but it seems like I can only add it into specific pages in my Ionic app, not…

Julius
- 218
- 3
- 16
0
votes
1 answer
"Plugin with id 'io.fabric' not found" error. after removing fabric from build.gradle
in my ionic react project android version build using capacitor, i followed the steps of removing all the fabric and replacing them with crashlytics
reference: https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android
the build…

Tera
- 121
- 3
- 12
0
votes
1 answer
Ionic React Promise not waiting after setting State on button click
Okay I have the following problem:
On a button click, I want to do a GET-Request to retrieve lat/lon data of a address, update the state of the component and then move on to the next page with the updated state as passed data.
My code looks like…

Jule Wolf
- 221
- 1
- 3
- 11
0
votes
2 answers
How do I set the status of a variable of a class in a method that using this keyword
I am trying to display the outcome of a reset service in my Ionic react app. I am unable to use the this.setState({resetSuccess}) because I am trying to do that in a method, and this would refer to the method's scope. (I have also mentioned the…

Gaurav Thantry
- 103
- 1
- 13
0
votes
1 answer
React-testing-library with Ionic v5 (react) and react-hook-form- change events do not fire
I am trying to test a component rendered with Controller from react-hook-form with react-testing-library
(

rakitin
- 1,943
- 6
- 25
- 51
0
votes
2 answers
How do I pass a toggles state with its onChange-call in Ionic React?
Say, I have this toggle:
vars.darkMode is the saved value of the toggle, so the state is set when loading the page.
So, know I want to write…

traxx2012
- 394
- 2
- 16