Giter VIP home page Giter VIP logo

neonexus / sails-react-bootstrap-webpack Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 5.0 2.59 MB

An opinionated configuration of Sails.js, using Webpack to create multiple React apps from a single repo.

License: Other

JavaScript 70.63% HTML 0.35% Dockerfile 0.15% SCSS 0.70% EJS 27.27% Shell 0.91%
autoupdate autoupdater bootstrap monorepo ngrok node nodejs react reactjs sails sailsjs selfupdate tmux webpack

sails-react-bootstrap-webpack's Issues

React Strict Mode and Session Cookie

Hi,

I'm using your starter pack for my app.

I have a function which makes API call like below

    // Fetch the tasks of `workflowDescription` from DB
    const fetchWorkflowTasks = async () => {
        return new Promise(function (resolve, reject) {
            props.api.post({
                url: '/fetchWorkflowTasks',
                body: {
                    workflowDescription: props.workloadDetails.Description,
                }
            }, (res) => {
                if (res.tasks) {
                    handleWorkflowTasks(res.tasks);
                    resolve(res.tasks);
                }
            }, (err, resp) => {
                reject('Oops! Couldn\'t fetch tasks from DB.');
            });
        });
    }

In React strict mode, the call properly returns the required data from the Sails backend. But immediately after that, API error occurs throwing You are not logged in from isLoggedIn.js.

If I disable strict mode, there is no issue. I'm not sure what's the issue and how to debug!?

Could you please guide me on this? Thanks.

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.