Fork me on GitHub
#cljsrn
<
2021-03-06
>
Oliver George01:03:48

We're doing some consulting work at the moment. Advising a large client on a digital transformation project. It's made me look more closely at non-RN mobile app development options more closely. This NuBank article makes a good pitch for the strengths of Flutter. https://building.nubank.com.br/scaling-with-flutter/

Oliver George01:03:55

Wondering if anyone has switched from Flutter to RN and has viceral reactions to the claims.... "After gathering evidence, the team decided to adopt Flutter, thanks to its excellent testing capabilities, such as built-in testing infrastructure for Unit, Integration, and End-to-End tests without the need for rendering to the screen. Overall, — compared to other options — they also found the Flutter development experience to be superior, with better hot reload capabilities, robust official documentation, and a more stable API."

raspasov04:03:20

I haven’t tried Flutter. Wondering what the library/ecosystem looks like for it?

lepistane09:03:06

sorry i can't provide more pros and cons it was 2 years ago and maybe situation improved but when i tried it i really really didn't like it. I was playing with it for a month and when i switched to RN i was much much happier. Never looked back since

dotemacs11:03:19

Christophe Grand is working on a port of Flutter to Clojure. Not publicly available yet... best to speak to him about the details

dotemacs14:03:02

And he tweeted recently that he’s been busy with work recently to get this out of the door/open sourced

🥲 3
Oliver George10:03:05

I'm interested to see what he produces. Also curious what dev experience is like.

6
Oliver George08:03:46

Thanks for your thoughts everyone.

👍 3
kennytilton14:03:06

Very surprised, @U055DUUFS, to see testing wagging the UI framework selection dog. Are they otherwise that interchangeable?

zendevil.eth13:03:28

I’m trying to use the options prop to have a right header button and a custom title, something like the following https://reactnavigation.org/docs/header-buttons/:

function StackScreen() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="Home"
        component={HomeScreen}
        options={({ navigation, route }) => ({
          headerTitle: props => <LogoTitle {...props} />,
        })}
      />
    </Stack.Navigator>
  );
}
And this is what I have:
[:> (.-Screen Stack) {:name "Event Title"
                           :options (fn [navigation]
                                      {:headerTitle (fn [props] "Some Title")
                                       :headerRight
                                       (r/as-element
                                        [button {:title "Next"
                                                 ;;:onPress #(dispatch [:add-thumbnail navigation])
                                                 }])})
                           :component (r/reactify-component event-title)}]
However, neither am I seeing the custom headerTitle nor am I seeing the headerRight which should be the button component. What am I doing wrong?

pez15:03:35

I think you might need to wrap the return value of the function in (clj->js …), @ps

zendevil.eth16:03:47

@pez now I have the following:

[:> (.-Screen Stack) {:name "Event Title"
                           :options (fn [navigation]
                                      (clj->js
                                       {:headerTitle (fn [props] "Some Title")
                                       :headerRight
                                       (r/as-element
                                        [button {:title "Next"
                                                 ;;:onPress #(dispatch [:add-thumbnail])
                                                 }])}))
                           :component (r/reactify-component event-title)}]
But I get the following error:

pez16:03:22

Wild guess: try with r/as-component

zendevil.eth16:03:57

@pez where should I put as-component?

pez16:03:30

Sorry, instead of r/as-element, I meant.

zendevil.eth16:03:23

@pez That gives the following

pez16:03:12

I’m out of guess, unfortunately. I haven’t used that API myself. (But I’m pretty sure the clj->js is needed there.)