
Show HN: Clothes shopping app UI built in React Native - atf19
https://github.com/ATF19/react-native-shop-ui
======
IBCNU
I used Redux when it first came out, but now use Mobx as it's just... easier
and has less boilerplate. Also it's easy to extend into a reframe-like pure
function state management system if you want to avoid passing around
objects/inheritance.

~~~
robertAngst
My new note to self:

Dont read threads about the stack I'm dealing with.

It will only make me question everything.

~~~
su8898
So true. I must start doing this as well. I recently started picking up
momentum on my React-Redux skills. Constantly reading various opinion pieces
(irrespective of whether they are supported/non-supported) are tempting me to
take a look a look at (or evaluate) other libs/frameworks.

~~~
paulwithap
If it helps, I’ve used Redux in a couple production apps and loved it.
Boilerplate can be a bit tedious at times, but in exchange you get a lot of
sanity and clarity in your code.

------
jeeeeefff
I was surprised to see that this uses React without Redux for state
management. I'm aware that Redux is a separate, optional, codebase, but from
how people have been talking, it seemed like just about everyone was Redux or
bust.

How many production-scale projects don't use Redux? Is this more common than
I'm thinking and hearing?

~~~
kbcool
I wouldn't get too excited. This is just a shell app, a few screens, no remote
data, only temporal state persistence and nothing really functions (eg no form
validation, no payments etc).

I assume it was used for some tutorial?!

Not saying you can't get away with not using redux at all but this isn't an
example of that. Try mobx or unstated for simple state management.

Personally my projects tend to use it because I'm used to it. Once you get
your head around it the boilerplate is not too much to deal with and it slides
in so nicely with react. You just need to think in a functional way.

Also features like redux-persist make it powerful. You wouldn't believe the
number of apps released on the stores using RN that don't persist state and
simply restart when the phone runs out of memory or gets rebooted.

~~~
robertAngst
Heh, when I saw UI, I was thinking-

So what?

Javascript, RN, flux, elements, etc... there are soo many ways to make it
pretty. That was the whole point. Pretty for android and ios.

The redux tutorial is awful, you dont run the program until the very end.
Needless to say, it didnt work and I ended up following a medium guide...

Now I'm trying to get redux working with laravel who requires a CSRF token on
each post request. Not a big deal, but getting this CSRF token to be submitted
doesnt seem to be trivial since it needs to be requested from the php and
submitted all at once.

Not complaining because this is just logic and the job, but the difference
between a working RN app and a working RN UI is 10 months.

~~~
chrisco255
Not sure what Redux would have to do with a CSRF token? That's HTTP logic.

------
buildbuildbuild
I love exploring structure and approach in codebases written recently, it’s
one of the best ways to learn a new language or mentally refresh on what new
libraries and tools exist.

Anyone know of good resources or proper search terms for “show me fully
executed applications built on X language/stack within the past year”

~~~
Jamieee
I've found realworld.io is pretty good for working examples of different
stacks. Maybe not as up to date as you're looking for, but a good start for
new languages and frameworks.

~~~
chrisweekly
Thanks for the great tip, Jamieee! realworld.io looks worthwhile.

------
estsauver
This is really cool! Thanks for releasing it, I love seeing how other people
structure medium sized applications.

Why'd you pick react native?

~~~
robertAngst
Works on android and IOS?

Is there anything else that does both?

~~~
Klathmon
Not to be cheeky, but why not just react?

~~~
robertAngst
Isnt react web only?

~~~
Klathmon
But the web runs on all of those platforms, and there are a ton of ways to
wrap a browser view into a native "wrapper" to put in the app store (including
react native)

~~~
robertAngst
Right, but web looks like web even if you wrap it.

RN is supposed to feel like an Android or Iphone app.

(Btw, someone prove me wrong because I have a full blown working
website/database and the front end is RN and I'd love to stop because I hate
front end auth and multiple platform...)

~~~
jgalentine007
Onsen UI could maybe tackle that (I'm working with it) - gives you material or
Cupertino look on the fly. Still caveats with Cordova vs Native but it's alot
less work...

------
specialist
Hi Atef. Nicely done. Good screen designs.

I'll check out your code soonest. And I'll try to dig up an android device, so
I can try your demo.

I just wanted to acknowledge your effort and good taste, since everyone else
got distracted by the framework wars.

Without revealing too much about me, since this is my anon account, I work in
a nearby field. If you wanted to pursue this domain (fashion), I encourage you
to focus on product discovery. Either something novel, or excellent execution
and refinement of current solutions.

I don't mean personalization, recommenders. (Unless you have something
awesome.)

Rather, I mean UX for better forraging behavior. By analogy, the digital
equivalent of wandering around in libraries, museum, or retail. Whatever that
looks like.

Happy hunting.

------
cridenour
I feel like Redux has been the love child of the React community (not
necessarily HN) and I have felt like a crazy person for not loving it and
clinging to AltJS and then to MobX. Good to see a lot of other MobX fans in
this thread.

------
cubano
I am wrong to wonder why this doesn't run in a browser, or does it?

I was under the impression React uses the browser DOM (or virtual DOM of
course) to render its components...wouldn't that mean it can run on the
desktop in a browser?

~~~
awinograd
This project is using React Native which is slightly different from ReactDOM
(commonly referred to as just React/ReactJS).

In the past, ReactJS and ReactDOM were completely interchangeable. However,
some time ago now React split the DOM specific parts of the library into
ReactDOM which allowed the non-DOM specific parts of the library to be shared
more easily across different rendering targets. Some examples:

    
    
      * android (via react-native)
      * ios (via react-native)
      * canvas https://github.com/Flipboard/react-canvas
    

Since the release of React Native there have been a couple of interesting
projects that allow developers to use the same APIs as React Native, but
rendering to the DOM instead of android/ios native views.

[https://github.com/necolas/react-native-
web](https://github.com/necolas/react-native-web) is a great production ready
lib but requires a bit of setup to get it working with a react-native project.

[https://github.com/vincentriemer/react-native-
dom](https://github.com/vincentriemer/react-native-dom) is an extremely cool
experimental idea to bring react native projects more seamlessly onto the web.
It's still in early stages and has some significant tradeoffs compared to
react-native-web. For one, it includes a webassembly implementation of Yoga
([https://yogalayout.com/](https://yogalayout.com/)) which makes layout much
more consistent among ios/android/web but at the cost of delivering more JS
upfront to the browser.

~~~
johnmarinelli
another cool custom renderer using React is this:
[https://github.com/toxicFork/react-three-renderer-
fiber](https://github.com/toxicFork/react-three-renderer-fiber)

it wraps the React API over three.js. Unfortunately it's a very wip-ish state,
but I think it has a lot of potential.

------
deltateam
very nice! this is one of those "git clone and walk away" moments, because
something this good and free won't be around forever

