Re:Reactant is a new native framework for iOS
by eberkund on Friday September 29, 2017 @02:34PM
(#15367847)
Nice, maybe if we had more native frameworks of similar calibre to what we have in the realm of web development we could start seeing more new applications going back to native.
Re:Reactant is a new native framework for iOS
by eridius on Friday September 29, 2017 @02:46PM
(#15367987)
I'm confused. This says it's a Swift framework, but it also says you can live-reload code. If you're live-reloading code, then it must be something like JS and not Swift.
Edit: Ok I looked at Reactant itself, it does appear to have you writing Swift. Is the article just wrong about live-reloading code, then? Is it really just live-reloading UI elements while keeping the code the same?
Re:Reactant is a new native framework for iOS
by dvdhnt on Friday September 29, 2017 @03:05PM
(#15368188)
> This split to XML also allowed us to implement a live UI reloading. It’s something that will save quite a lot of development time as you can see every change in the UI without recompilation and redeployment.
It looks like the Reactant UI is an add-on for Reactant that has you writing XML which is "live reloaded". It's not clear whether or not only the XML is eligible for live reloading or not.
Re:Reactant is a new native framework for iOS
by ryanschneider on Friday September 29, 2017 @03:01PM
(#15368138)
Looks like the live reload is just for the optional XML used to lay out your components. So definitely not full live reload. Seems useful for styling iteration but not so much for logic testing.
Re:Reactant is a new native framework for iOS
by TadeasKriz on Friday September 29, 2017 @06:58PM
(#15369980)
You are right, live reloading is just for the UI part. Swift doesn’t have the same dynamism ObjC had, so we can’t simply swap the implementation. We’ve tried Injection4Xcode (hope I got the name right), but it’s limited to ObjC only (or @objc Swift classes).
Re:Reactant is a new native framework for iOS
by TadeasKriz on Saturday September 30, 2017 @01:27PM
(#15373930)
You can't change the binary, but you can change the app. But with Reactant, we compile the XML files containing the UI into native Swift when building in Release mode. We do that to remove any runtime overhead that would be added by parsing the XML and going through it to create the UI/layout.
Re:Reactant is a new native framework for iOS
by Zeppin on Friday September 29, 2017 @03:41PM
(#15368480)
They’re not mutually exclusive but the main reason that Swift is so performant is because it’s a compiled language rather than an interpreted language like JS. To support live reloading with a compiled language you would either need to support live compilation and re-deployment (difficult) or treat Swift as a scripting language (redundant).
Edit: Ok I looked at Reactant itself, it does appear to have you writing Swift. Is the article just wrong about live-reloading code, then? Is it really just live-reloading UI elements while keeping the code the same?
It looks like the Reactant UI is an add-on for Reactant that has you writing XML which is "live reloaded". It's not clear whether or not only the XML is eligible for live reloading or not.
Source: https://docs.reactant.tech/reactant-ui/introduction.html
And whats the difference between this and RxSwift