react-hybrid
react-hybrid copied to clipboard
Redux support?
When using this library with Redux I'm getting the error 'Error: Could not find "store" in either the context or props'. Is it possible to send the redux store to the router in some way?
Hi,
I am wondering the same thing too. Much appreciated if any help can be provided on this topic. Thanks!
any plan to add redux support?
I hope It has been fixed in 0.3.6. @vladsoroceanu @PM00095 could you check it, please?
#138
Let me check that and let me know if found some issues.
did any of you get redux working with this? I get the following problems when I connect state to props:
Unknown provider: [object Object]DirectiveProvider <- [object Object]Directive]
Is there anyway of doing in this in javascript? <Provider store={store}> <App /> </Provider>
@philmday, looks like hybrid can’t recognize the type of your view. You can specify it explicitly by adding $type: "react"
to your view definition.
@Anber @philmday
I too have the same issue:
I define the states in angularjs code, added $type, still does not see the store getting:
$stateProvider
.state('index', {
url: _embeddedContextRoot,
abstract: true,
component: ReactHome,
$type: "react"
})
.state('main', {
parent: 'index',
url: '/main',
$type: "react",
views: {
mainContent: {
component: Overview
}
}
})
Result:
angular.js:15567 Error: [$injector:unpr] Unknown provider: [object Object]DirectiveProvider <- [object Object]Directive
https://errors.angularjs.org/1.7.8/$injector/unpr?p0=%5Bobject%20Object%5DDirectiveProvider%20%3C-%20%5Bobject%20Object%5DDirective
at angular.js:138
at angular.js:4924
at Object.getService [as get] (angular.js:5084)
at angular.js:4929
at Object.getService [as get] (angular.js:5084)
at getComponentBindings (templateFactory.js:179)
at TemplateFactory.push../node_modules/@uirouter/angularjs/lib-esm/templateFactory.js.TemplateFactory.makeComponentTemplate (templateFactory.js:168)
at Ng1ViewConfig.getTemplate (views.js:74)
at Object.<anonymous> (viewDirective.js:310)
at angular.js:1388 "<ui-view name="mainContent" portalview="[object Object]" class="ng-scope">"