Giter Site home page Giter Site logo

mrfoxpro / solid-rollup-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 2.0 1.16 MB

Dev-ready boilerplate for creating modern and truly fast websites with solid-js

JavaScript 46.61% TypeScript 38.90% HTML 10.21% SCSS 4.28%
solid rollup esmodules typescript boilerplate solid-js modern-browsers native-modules solid-js-rollup es-modules

solid-rollup-boilerplate's Issues

Child Routes and Preloading

Hello :)

I tried to add child nodes to my app

const routes = [
  {
    name: 'landing',
    path: '/',
  },
  {
    name: 'home',
    path: '/home',
  },

  {
    name: 'groups',
    path: '/groups',
    children: [
      { name: 'view', path: '/:id<\\d+>' },
      { name: 'list', path: '/list' },
    ],
  },
  {
    name: 'settings',
    path: '/settings',
  },
] as const;

export const { Link, Router, Provider, router } = createSolidRouter(routes, {
  createRouter5: (routes) => {
    const router = createRouter(routes, {
      allowNotFound: true,
      autoCleanUp: true,
      defaultRoute: '/home',
    });
    router.usePlugin(browserPluginFactory({ useHash: false }));
    router.usePlugin(loggerPlugin);
    return router;
  },
});

but when I try to refresh the page with the url localhost:3000/users/123, I get following error msg and the page is not loaded :(

Screenshot 2020-12-08 at 13 40 28

Routing via router.router5.navigate('groups.view', { id: 12 }); works fine, so does refreshing the page with just the path localhost:3000/groups ๐Ÿค”

Does anyone have an idea, what this is about?

Help would be highly appreciated... since this is delaying my x-mas present ;(
Thank you! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.