Giter Site home page Giter Site logo

Comments (4)

alexmingoia avatar alexmingoia commented on July 28, 2024 2

I don't think the server-side rendering is necessary as part of the starter-app. It can always be added later.

from pux-starter-app.

alexmingoia avatar alexmingoia commented on July 28, 2024

Wow! That example is great. I agree about removing pulp and gulp. It'd be great if that were a PR, otherwise I could link to that repo instead of this one in the guide and readme.

from pux-starter-app.

sectore avatar sectore commented on July 28, 2024

Nice, I would love to do a PR ;) What is the reason about the server side rendering (https://github.com/alexmingoia/pux-starter-app/blob/master/src/js/index.js#L9 and https://github.com/alexmingoia/pux-starter-app/blob/master/src/purs/Main.purs#L36)?

from pux-starter-app.

alexmingoia avatar alexmingoia commented on July 28, 2024
module.exports = function (url) {
    return Main.server(url)(initialState)();
};

The reason for this is because the app needs the request URL to do any routing with Pux.Router, and so if src/js/index.js is required in nodejs, it will export a function that takes the request URL from something like Express. There may be a better way to accomplish this.

The other thing I now notice is that when I rewrote this for Pux 1.0.0, I did not actually add back in the code for server-side rendering... so this code isn't even being called. 😆

from pux-starter-app.

Related Issues (20)

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.