Fork me on GitHub
#reagent
<
2019-07-31
>
mitch10:07:15

Is it generally recommended to use Bidi over Secretary as a routing library? I keep running into an issue where if I navigate to an /about page and try to do a refresh on that page it crashes because the /about page doesn’t actually exist in the index file

oconn11:07:41

@mitch So that sounds like your server isn’t setup to server the client page requests properly. You’ll want to make sure you’re re-writing your index requests to server up index.html. As for the libs - i’ve used both but tend to lean more towards bidi.

👋 4
💯 4
👍 4
lilactown16:07:19

Personally I prefer reitit

pmooser21:07:26

I'm trying to use react-grid-layout with reagent and shadow-cljs but this stuff is tricky to debug!

pmooser21:07:03

I'm getting an error "Warning: React.createElement: type is invalid", and I'm guessing it's because the class I'm referring to from the imported js project maybe doesn't exist.

pmooser21:07:26

But I'm not quite sure how to introspect and look at the actual code that shadow-cljs is pulling in to try to see what the right name is.

pmooser21:07:34

Does anyone have any experience with something like this?

thheller21:07:02

@pmooser using the REPL is usually the quickest way. (require '["the-js-dep" :as x]) then (js/console.dir x) or so

pmooser21:07:46

@thheller Thank you! I will give it a try ...

pmooser21:07:57

@thheller Would you mind answering a question? If I have an import in JS like

import RGL, { WidthProvider } from "react-grid-layout";
is it correct that in shadow-cljs that should look like:
["react-grid-layout" :as rgl :refer (WidthProvider) :default RGL]
or am I misinterpreting the docs?

pmooser21:07:06

Maybe I can puzzle it out from the react-virtualized example that you give in the docs ...

pmooser21:07:30

I have to step away for a bit, but I'll be back later. Thank you @thheller!