Skip to content

Programattic createRoute error #1272

Closed
Closed
@jannavarro

Description

@jannavarro

I did the workaround stated in #887 but I get an error of ReactDefaultInjection.js: Uncaught TypeError: type.toUpperCase is not a function. I just want to ask for guidance if there is something I need to correct in the ff because I tried different approaches already.

--MainRoute.jsx
import App from "../../app0";
import Login from "../auth/login"

var MainRoute = Router.createRoute({
handler: {App}
});

Router.createRoute({
name: "login",
parentRoute: MainRoute,
handler: {Login},
isDefault: true
})

export {MainRoute}

--Index.jsx
import {MainRoute} from "./modules/routes/AuthRoute"
//some code
Router.run([MainRoute], function (Handler, state) {
      React.render(
        <Handler  cursor={data} statics={state} />, document.body);
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions