untangled

NEW CHANNEL: #fulcro
fatihict 2017-03-27T06:48:57.567469Z

Hello folks, I want to use the UntangledApiHandler from the Untangled Server. I have read the source code about the untangled-system, but I don't understand the modules passed in to that function. Can anyone help me understand the code?

2017-03-27T07:19:03.830443Z

What's the purpose of the :ui/react-key? Is it mostly to allow forcing a refresh of the entire UI?

claudiu 2017-03-27T07:21:28.852959Z

yep, as far as I know πŸ™‚

2017-03-27T07:22:23.861833Z

How is that usually done? (merge! reconciler {:ui/react-key "some-key"}) ?

fatihict 2017-03-27T07:32:12.957829Z

@danielstockton Tony Kay explains it in his video series here (I linked the correct time in the video as well :)): https://youtu.be/vzIrgR9iXOw?t=9m27s

2017-03-27T07:32:29.960836Z

Oh, thanks!

fatihict 2017-03-27T14:07:40.247080Z

I found the modular-server branch on the untangled-template github page :aw_yeah:

fatihict 2017-03-28T08:25:00.923944Z

@adambros Yes, I've managed to find the answer by digging through the source. I missed the documentation on the develop branch πŸ˜„, but that does clear things up. I am currently wrapping our existing system with the untangled-system. I defined two modules with ApiHandlers to parse incoming requests based on the environment. How are you folks using it?

adambros 2017-03-29T23:18:05.756652Z

essentially it provides a middleware fn that looks at the request url and decides whether it should serve up an image, or continue along

adambros 2017-03-29T23:18:43.763153Z

but it’s done as an ApiHandler so that the consumer of it decides where to place the image-library middleware

adambros 2017-03-29T23:19:40.772531Z

oh and it also provides read and mutate endpoints on top of that, which is determined by where it’s located in the :modules vector

adambros 2017-03-29T23:20:39.782412Z

this was essentially the library that sparked the need for better/simpler ways to control your middleware and install library reads and mutates

fatihict 2017-03-30T09:11:16.818855Z

Oh nice πŸ˜„

tony.kay 2017-03-27T15:59:11.757613Z

I do not see an obvious problem with the code.

tony.kay 2017-03-27T15:59:30.765184Z

are you sure you've loaded the file that contains your mutation?

tony.kay 2017-03-27T15:59:34.766504Z

dynamic language

tony.kay 2017-03-27T15:59:43.770024Z

won't run a multimethod instance if it isn't loaded

wilkerlucio 2017-03-27T16:25:42.334304Z

@eric.shao you may want double check if your browser cache is deactivated, I had lost some hours in the past trying to debug something that ended up being just caching...

tony.kay 2017-03-27T16:25:59.340003Z

Ah yes, that is a good tip too

adambros 2017-03-27T21:39:22.527981Z

fatihict: did you end up finding the answer to your question?

adambros 2017-03-27T21:41:20.557371Z

I wrote documentation here https://github.com/untangled-web/untangled-server/blob/develop/README.adoc#22-the-simple-way

adambros 2017-03-27T21:41:52.565160Z

Looks like part of the problem is that for untangled server the default branch is master

tony.kay 2017-03-27T23:18:54.780267Z

ooops. Fixed. It is now develop

πŸ™‚ 1