Fork me on GitHub
#fulcro
<
2018-07-26
>
tony.kay00:07:46

cool. night šŸ™‚

tony.kay04:07:59

Pushed 2.6.0-RC5 to Clojars. I ran through all of the book demos and found some minor problems. It turned out that a few of the demos had bugs that ā€œmade it throughā€ and worked, but which didnā€™t continue to work in the new version. It is also interesting to note that the changes to component local state (we no longer wrap this, it is direct React) can cause minor differences that might affect you.

šŸ‘ 4
currentoor17:07:01

@tony.kay when i try to run lein repl with RC5 i get this exception

Caused by: java.lang.RuntimeException: No such var: fulcro.client.dom-common/interpret-classes, compiling:(fulcro/client/dom_server.clj:439:1)

currentoor17:07:08

it doesnā€™t happen with RC4

tony.kay17:07:48

open an issue I guess

currentoor17:07:33

youā€™re not seeing it?

currentoor17:07:44

might be something with my deps then

currentoor17:07:14

is there a way to see the diff between RC4 and RC5 in github?

currentoor17:07:51

maybe i can try to figure it out that way, it only happens if i require the dom-server anyway

currentoor17:07:19

i guess i can just look at the commits from Merge tag '1.6.0-RC4' into develop to the RC5 one

currentoor17:07:22

weird thing is iā€™m relying on fulcro.client.dom-common/interpret-classes in the client and its working fine, but itā€™s not defined in the server side

tony.kay18:07:28

Iā€™m working on other thingsā€¦so no time to look right now

tony.kay18:07:09

SSR has not been tested much in 2.6, and is likely to have issues still

tony.kay18:07:41

React 16 is doing SSR differently, and we need to patch that (new hydrate call)

tony.kay18:07:53

and I think we get to drop checksums

currentoor18:07:26

no worries, i made a new project from template, added my deps, and required dom-server in there, it worked fine

currentoor18:07:33

so most likely something in my code

currentoor18:07:27

:man-facepalming:

currentoor18:07:41

@tony.kay lein clean was all i needed to do

currentoor18:07:49

itā€™s working fine

currentoor18:07:50

well that was a ā€œfunā€ waste of time, maybe i should just get a tattoo that says lein clean?

currentoor18:07:50

this is one of the advantages of bootā€™s immutable file system, thereā€™s never a need to boot clean

bbss21:07:36

I think I'm having another issue with set-state! being not immediate, I'm using setTimeout in a handler so I guess that might end up overwriting set-state! somehow. From this point of the react state docs I understand I could pass an updater function: https://reactjs.org/docs/faq-state.html#how-do-i-update-state-with-values-that-depend-on-the-current-state But that doesn't work with prim/set-state!. Ended up fixing my issue like this:

(.setState this-of-guide  
  (fn [s]  #js {"fulcro$state" (dissoc (aget s "fulcro$state") :started-eval-step)}))

tony.kay22:07:27

@bbss So, set-state! uses the updater functionā€¦perhaps there is a bug in it?

tony.kay22:07:37

oh, I see: you want to remove something from state

bbss22:07:38

Yes, might be. It isn't obvious to me why it wasn't working.

tony.kay22:07:19

the behavior of set-state! uses, as you can see, the exact pattern, but it assumes youā€™re passing data to merge with existing state (as setState does)

tony.kay22:07:39

update-state! works more like swap!

tony.kay22:07:48

oh waitā€¦`update-state!` does look like it has a bugā€¦it should not be using get-state

tony.kay22:07:35

Iā€™ll open an issue on that

tony.kay22:07:54

I should have asked you for what you were doing/expecting

bbss23:07:56

@tony.kay Thanks, I'll have a look at update-state! tomorrow and try to explain what I'm doing and maybe figure out why it didn't work.