
WalmartLabs opensources its tool for bringing React Native to mobile apps - neutronbits
https://techcrunch.com/2017/09/29/walmart-labs-open-sources-its-tool-for-bringing-react-native-to-existing-mobile-apps/
======
jakebasile
If their Lacinia GraphQL library for Clojure [1] is any indication of code
quality, this should be very useful. I’m very impressed with the former, and
I’ll be sure to look this new one over.

1:
[https://github.com/walmartlabs/lacinia](https://github.com/walmartlabs/lacinia)

------
Dowwie
Are these discards from the jet.com acquisition or actual critical path
libraries?

~~~
mcescalante
Walmart acquired a company called Kosmix in 2011 and spun it out as a research
division called @WalmartLabs [1].

Walmart acquired the online retailer, Jet.com in late 2016 which still has
their own engineering team (using a lot of F#)

Stuff coming from @WalmartLabs is almost always real stuff that Walmart is
using in production (website, apps, etc.)

[1]
[https://en.wikipedia.org/wiki/@WalmartLabs](https://en.wikipedia.org/wiki/@WalmartLabs)

~~~
qmarchi
Yup! A portion of Electrode is being used inside of the Walmart.com app.

------
rboyd
it's interesting to see the react-native detractors in this thread vs an Ask
HN thread we had about react-native a couple of weeks ago. I wonder how many
people could really determine an app's usage of RN in a blind taste test.
could the disdain for js the language and bad memories of wrapped webviews be
bleeding over? in our experience RN has offered a ton of leverage for a small
team, and js makes a fine target to transpile to (we use cljs).

~~~
jjeaff
We are in the process of rebuilding our app in react native. As a test, we
created a portion of it in react native and did a side by side.

Our app is your basic slide out navigation with pages and forms and some
animation. There is literally no detectable difference.

The only thing that I am still not sure of is performance on older devices.
But on iPhone 6 and Galaxy S7... I wish we had started with react native from
the beginning.

------
briandear
Why a company the size of Walmart does this cross platform crap is beyond me.
Do they not have the resources to actually write real native apps in actual
Swift? Why is it desirable to code to the the worst common denominators for
devices? Cross platform is just lazy. And React “Native” is inferior to actual
native.

~~~
faceyspacey
Ultimately the declarative way of writing apps is objectively better and more
predictable than the old mutable way :)

Now that said, I agree on the performance costs, and too wonder why Walmart is
hellbent on this strategy, given the endless resources they have.

But at the end of the day, they have a head of engineering and need to make
their lives simpler just like everyone else. If you know how to squeeze the
performance out of RN/React, developing apps in the semi-FP declarative sate-
driven way is a dream compared to all the old ways of client app development.
People who's views are so against React/ReactNative usually haven't
experienced it for themselves. I suggest really giving it try before making
these comments which usually serve just to validate decisions already made.
I.e. to make one's self feel better about sticking to the old ways. However, I
totally understand what it feels like for new tools to pop up that put into
question old ways I've invested a lot into. That said, don't you think you'd
be better off fully exploring these ways before shooting them down? Don't tell
me you have--zero people that have grokked the effectiveness of declarative
state-driven programming make these remarks. They usually leave some hint at
their experience with React. In short, it's only you left in the dust :)

Give the tools a try, which I know will likely be hard for you because you are
likely coming from the Native world. I will say this: it's a lot more than
just one language to make hybrid apps (i.e. like past tools such as Titanium).
And, of course perf will be a challenge. That said, the perf is amazing given
what it is. But more importantly, the style of development is what it's all
about. It's so different and so much more predictable/debuggable than the old
mutable ways. To me, it matters not that it's in JS. What matters is the
declarative state driven way of development. If you can do that in native
code, you're basically doing the most important aspect--and basically there's
no argument from me there. There are some libraries that allow for that, but
it's nowhere near the extent of what you can do in React/JS, given its
ecosystem. I lot of work is being put in here to make this the best of breed
future of application development. If you can't see it, you're missing out. Do
your homework on React once and for all. You can thank me later.

Last point: Walmart's tool here is specifically meant for making apps where
some of it you want in "actual native" and other parts in "react native."
Without a doubt coding the React style is the best DX for UI development. AND
without a doubt, "actual native" performs far FAR better. So what they have
here is a toolbox for those with an "engineering mindset" to pick the best
tool for the job. Everything that's happening is just getting better and
better for all parties involved, no matter where your experience lies.

~~~
pavlov
I’ve done both native (Mac, Windows, iOS, Android, Gtk+, Tizen) and React.

Your post comes off as condescending fanboy hype. I understand you want to
promote React, but this approach does more damage than good.

My personal experience is that “declarative” in this industry is a perennial
silver bullet. What often goes unnoticed is that declarative languages are not
very future-proof, as extensions are constrained by the originally chosen
primitives. Pathological examples are enterprise Java+XML and CSS — both of
these were hailed as declarative breakthroughs originally, and today they are
the stuff of “TheDailyWTF” nightmares.

Surely that will not happen to React, you say, because it gets so many things
right? Well, as a thought exercise, imagine what things could be like in 2027
and then imagine you’re stuck working in a 15-year-old patched up
JavaScript/HTML hybrid. That is the endgame. I like React, but it’s subject to
the same market forces as every other technology in this space.

~~~
jeswin
> Java+XML and CSS — both of these were hailed as declarative breakthroughs
> originally, and today they are the stuff of “TheDailyWTF” nightmares.

Java+XML isn't declarative, XSLT was. XSLT declined when XML declined. CSS
works quite well even today and is still widely used.

Declarative coding style is in many ways resistant to obsolescence since
you're just declaring what you want than how to do it. The best example is
SQL; mostly unchanged in decades.

~~~
pavlov
XML is certainly declarative.

As far as CSS goes — ask any front-end web developer if they would like all
programming to be more like CSS...? It is a collection of thousands of
properties, often overlapping or contradictory, some with their own
sublanguages for further specification, and many features are defined as
hidden side effects of one property when nested inside another. A total mess.

You can only declare what you want if the language lets you say it. (Think of
Wittgenstein’s famous maxim.) SQL was a great design informed by decades of
research. Most software designs are not like that, unfortunately.

