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

UIRouter, <View> errors when setting up react-hybrid #36

Open
crcommons opened this issue May 8, 2018 · 2 comments
Open

UIRouter, <View> errors when setting up react-hybrid #36

crcommons opened this issue May 8, 2018 · 2 comments

Comments

@crcommons
Copy link

crcommons commented May 8, 2018

I've attempted to set up react-hybrid in my Angular app while we migrate to React, following the Read.me and the example app. I'm using React 16.3.2, and it's unclear if it is compatible with the current version of react-hybrid or setup is wrong.

Setup looks something like this in app.js:
import { UI_ROUTER_REACT_HYBRID } from '@uirouter/react-hybrid';

angular.module('app', [ ... UI_ROUTER_REACT_HYBRID, ... ])

Then immediately get the following errors (edited for brevity, but I can post additional error information if necessary):

Warning: The <UIView /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change UIView to extend React.Component instead.

warning.js:33 Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of 'ReactUIView'. in UIView (created by ReactUIView) in UIRouterContextComponent (created by ReactUIView) in ReactUIView

Warning: Failed prop type: The prop 'router' is marked as required in 'View', but its value is 'undefined'. in View in UIView (created by ReactUIView) in UIRouterContextComponent (created by ReactUIView) in ReactUIView

Uncaught Error: UIRouter instance is undefined. Did you forget to include the <UIRouter> as root component?

The above error occurred in the <View> component: in View in UIView (created by ReactUIView) in UIRouterContextComponent (created by ReactUIView) in ReactUIView
Consider adding an error boundary to your tree to customize error handling behavior.

@billycrid
Copy link

Experiencing exactly the same error message when looking to upgrade from v0.1.0 to v0.2.0

@agos
Copy link

agos commented May 16, 2018

same here. the "component appears to have a render method" goes away when downgrading to 0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants