Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: tab silently fails to load if content is not wrapped in IonPage #19832

Closed
bitjson opened this issue Nov 4, 2019 · 3 comments
Closed

bug: tab silently fails to load if content is not wrapped in IonPage #19832

bitjson opened this issue Nov 4, 2019 · 3 comments
Assignees
Labels
package: react @ionic/react package

Comments

@bitjson
Copy link

bitjson commented Nov 4, 2019

Bug Report

Ionic version:
@ionic/react: 4.11.0

Current behavior:
If the developer forgets to wrap the contents of a tab in <IonPage>, switching to the tab fails silently.

Expected behavior:
It would be great if a useful error message could be thrown. Especially for new users getting started, it's easy to miss how the components depend on others.

Steps to reproduce:
On any of the sample apps, replace <IonPage> in one of the tabs with <div>. When the user clicks the IonTabButton to switch to that tab, it silently fails to switch. (However, if the user navigates directly to the tab, it will render properly on page load.)

Ionic info:

   Ionic CLI: 5.4.5
   Ionic Framework: @ionic/react 4.11.3
   NodeJS : v10.16.3
@elylucas
Copy link
Contributor

elylucas commented Nov 7, 2019

Thanks for the suggestion, @bitjson. In the next release, there will be a console warning if no IonPage is found to render while in development. Thanks!

@elylucas
Copy link
Contributor

elylucas commented Nov 7, 2019

fix released in 4.11.4

@ionitron-bot
Copy link

ionitron-bot bot commented Dec 7, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Dec 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: react @ionic/react package
Projects
None yet
Development

No branches or pull requests

2 participants