Swift UI makes me want to get back into Apple development! It looks really good.
#wwdc
@furstenberg I'm SO excited about Swift UI! I have some new apps I've been working on the foundational aspects of and holding off on the UI. Boy am I glad I did!!
@EddieHinkle Nothing like a real project to learn a new tool.
@hjertnes You are correct! I like my markup html-like.
But I do like reactive programming. And I’ve been wanting to get back into iOS programming again for some time. Just for fun you know.
@furstenberg I think jsx is much more like html than any of the weird template languages.
What I think is annoying about Swift UI is how revolutionary people think it is, while every single web developer wonders where they have been the last 5 years
@hjertnes Not the examples I’ve seen. That has been html with js in it, usually inside a js function.
Like this from the docs:
function Hello(props) {
return <div>Hello {props.toWhat}</div>;
}
And I mean, that’s easy to follow. But I’d rather just write this:
<div>Hello {props.toWhat}</div>
And some React code do that. Usually with a return statement with the markup in it. That I much prefer. The markup is usually almost one to one with the Svelte template.
And all this might just be me not knowing much React. So feel free to school me. 😉
@furstenberg All you have to do is const Hello = ({toWhat}) => <div>{toWhat}</div>. But here is the thing though, everything in React is a function, because unlike a template system react is just javascript code. There are no templating like that, there are JSX which is just shorthand for react code that either interacts with the DOM or some Native User UI system.
I'm not sure if it makes sense to compare React and Svetle because they are very different. if you like one of them you'd never consider to take job doing the other.
@hjertnes Good thing I introduced Svelte at my current job than. 😉
That said, I’d like to know more about React. So many of our job applicants sends React examples. And I’d like to talk more intelligent about it if I can.
So perhaps the new application I’m writing in Sapper and Swift UI should also have a React one. 🤔
@furstenberg React is just one part of it though. But I’ve been wondering: how was the reactions when you went for svelte ?
@hjertnes I used Svelte from day one in 2016. Everything I created at home used it. Early 2017 I convinced my team to use it for a prototype.
They loved it.
I showed the work to three other senior frontenders. After much testing they dropped their suggestion for us to use React + Redux as our new stack. They loved it as well. So our ideas about micro front ends went ahead using Svelte.
The first year there were still people wondering why we didn’t use React or Angular or Vue.
But as our UI library and tools got better and better, most developers seem very happy with the choice.
@hjertnes 😂😂😂 No.
But there were some heavy “discussions” last year, when some of the developers thought they could deviate from our multi-year plan.
Mostly that was due to poor communication from the Frontend Guild.
And as the leader, I take full responsibility for that.
Changing a 20+ year application takes time. So we figured it would take a couple of years for all the changes to be in place.