I need to redirect users to login page if they are not authenticated. I need something like route.beforeEach in Vue.js, ideally:  sapper.beforeRouteChange((to, from, next) => {    const isAuth = "[some session or token check]";    if (!isA...
I've decided try out Svelte for my next website, and this will be a static website hosted using GitLab pages.  I got the basic compilation working which generates dist/bundle.js and dist/bundle.css.  The issue is that I cannot upload this dist fo...
I'm receiving raw html snippets from a headless CMS that I need to render as-is in a Sapper application.   This also includes cases where I receive an opening tag and the corresponding closing tag as two pieces of HTML between which I add a Svelt...
I created register page, and submit without any input. I got 200 ok though backend server raise 400 reseponsed how can i get right status on my js code?       below image is api call to my backend server and responsed 400 status    api.js  const base...
My sapper app revolves around a table component. This table component has state (offset, limit, sort, filters, etc) that I would like to represent in the query string of the URL.  The table works fine currently by directly updating its state:  <bu...
I am using Sapper with Svelte to create a static website.  Because my website is static, I won't be bothering with a server and will use the sapper export command to generate static files which I can host on GitLab pages.  I have therefore remove...
I am creating a sveltejs/sapper app. I am trying to post some info from the frontend to the backend express server using axios in the script tag. Although get requests from external sources are succeeding, axios is throwing a 404 error while posting...
I'm using Svelte and Sapper for a project. Let's say I have some code that needs to read a cookie before it runs, and that code is in a route at say /profile or something.  My understanding is that Sapper provides no guarantees where the code...
Svelte 3: Props and array of children components  I'm planning to code a board game on hexagonal tiles, based on the excellent redblobgames articles, and coded with Svelte 3 / Sapper.  My question is about commmunication between children comlpone...
I am creating a Sapper page, where I'd like to use Google Sign-in button. It requires data-onsuccess attribute to specify callback function. From what I was able to discover from Google's platform JS library, it looks for the function in the...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.