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

React basic example not working #76

Open
pjnovas opened this issue Apr 28, 2020 · 0 comments
Open

React basic example not working #76

pjnovas opened this issue Apr 28, 2020 · 0 comments

Comments

@pjnovas
Copy link

pjnovas commented Apr 28, 2020

Hey, I've been using redux-first-router in the past (awesome approach for routing) and since I'm starting a new project I thought I would give Rudy a try.

I followed the steps at https://github.com/respond-framework/rudy/tree/master/examples/react
started the app and hit "Visit users X" button which throws this error in the console:

index.js:1 [rudy] action.type: USER_ERROR TypeError: [rudy]: defaultToPath::toSegment received unknown type
    at toSegment (actionToUrl.js:132)
    at defaultToPath (actionToUrl.js:166)
    at actionToUrl.js:95
    at Array.forEach (<anonymous>)
    at formatParams (actionToUrl.js:80)
    at actionToUrl.js:25
    at formatAction.js:4
    at push../node_modules/@respond-framework/rudy/es/middleware/transformAction/index.js.__webpack_exports__.default (index.js:6)
    at dispatch (compose.js:50)
    at next (compose.js:49)
    at pathlessRoute.js:34
    at dispatch (compose.js:50)
    at next (compose.js:49)
    at push../node_modules/@respond-framework/rudy/es/middleware/anonymousThunk.js.__webpack_exports__.default (anonymousThunk.js:10)
    at dispatch (compose.js:50)
    at next (compose.js:49)
    at push../node_modules/@respond-framework/rudy/es/middleware/serverRedirect.js.__webpack_exports__.default (serverRedirect.js:21)
    at dispatch (compose.js:50)
    at push../node_modules/@respond-framework/rudy/es/core/compose.js.__webpack_exports__.default (compose.js:21)
    at createRouter.js:130
    at visitUser (components.js:20)
    at onClick (components.js:10)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:306)
    at executeDispatch (react-dom.development.js:389)
    at executeDispatchesInOrder (react-dom.development.js:414)
    at executeDispatchesAndRelease (react-dom.development.js:3278)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:3287)
    at forEachAccumulated (react-dom.development.js:3259)
    at runEventsInBatch (react-dom.development.js:3304)
    at runExtractedPluginEventsInBatch (react-dom.development.js:3514)
    at handleTopLevel (react-dom.development.js:3558)
    at batchedEventUpdates$1 (react-dom.development.js:21871)
    at batchedEventUpdates (react-dom.development.js:795)
    at dispatchEventForLegacyPluginEventSystem (react-dom.development.js:3568)
    at attemptToDispatchEvent (react-dom.development.js:4267)
    at dispatchEvent (react-dom.development.js:4189)
    at unstable_runWithPriority (scheduler.development.js:653)
    at runWithPriority$1 (react-dom.development.js:11039)
    at discreteUpdates$1 (react-dom.development.js:21887)
    at discreteUpdates (react-dom.development.js:806)
    at dispatchDiscreteEvent (react-dom.development.js:4168)
console.<computed> @ index.js:1
r @ react_devtools_backend.js:6
logError @ logError.js:10
onError @ logError.js:75
(anonymous) @ autoDispatch.js:1
(anonymous) @ index.js:42
(anonymous) @ createRouter.js:135
Promise.catch (async)
(anonymous) @ createRouter.js:130
visitUser @ components.js:20
onClick @ components.js:10
callCallback @ react-dom.development.js:188
invokeGuardedCallbackDev @ react-dom.development.js:237
invokeGuardedCallback @ react-dom.development.js:292
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:306
executeDispatch @ react-dom.development.js:389
executeDispatchesInOrder @ react-dom.development.js:414
executeDispatchesAndRelease @ react-dom.development.js:3278
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:3287
forEachAccumulated @ react-dom.development.js:3259
runEventsInBatch @ react-dom.development.js:3304
runExtractedPluginEventsInBatch @ react-dom.development.js:3514
handleTopLevel @ react-dom.development.js:3558
batchedEventUpdates$1 @ react-dom.development.js:21871
batchedEventUpdates @ react-dom.development.js:795
dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3568
attemptToDispatchEvent @ react-dom.development.js:4267
dispatchEvent @ react-dom.development.js:4189
unstable_runWithPriority @ scheduler.development.js:653
runWithPriority$1 @ react-dom.development.js:11039
discreteUpdates$1 @ react-dom.development.js:21887
discreteUpdates @ react-dom.development.js:806
dispatchDiscreteEvent @ react-dom.development.js:4168

any ideas?

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

1 participant