Giter VIP home page Giter VIP logo

inertia-clojure's Issues

Error Response with Render

Is it possible to send a 404 response AND render an Page? I'd like to render a custom 404 page whenever the user goes to an undefined route. And I'd like to not have to setup stuff specifically for this, apart from my Inertia client.

I could not find any examples, so I'm creating an issue here.

dev refresh takes you to home page

This isn't really a bug per-se, but solutions will really help DX. I just hacked up the following for now in a reagent client. will obviously need to extend it to handle props, etc

(defonce cururl (atom nil))

(defn before-load
  []
  (reset! cururl (.. js/window -location -href)))

(defn mount-reload
  []
  (d/render [#'app] el)
  (.setTimeout js/window
    (fn []
      (.visit Inertia @cururl
        #js {:method   "get"}))
    1))

(defn after-load
  []
  (mount-reload))

Making things more clojury on the client

Just been wondering if there are plans around enhancing native clojure support. In particular stuff like say supporting EDN/Transit for data exchange. That would reduce the need for js/interop, have consistent data defs, qualified kw's, etc etc . Obviously the inertia server stuff is dead simple, but it seems like one would need to wrap/reimplement goodish chunks of the core Inertia and Intertia-react libs on the client

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.