Live data from Hacker News

Show HN: Clothes shopping app UI built in React Native

github.com

21–30 of 54 posts

Re: Show HN: Clothes shopping app UI built in React Native

#21

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?

You can absolutely build React apps without Redux, often times however I find myself using Redux the most while communicating with the Api (Call out to the API, get some new data, put it into the Redux store, App rerenders) so if this is just a shell, then I'm assuming it would be fairly easy to get away with not using it.

Re: Show HN: Clothes shopping app UI built in React Native

#23
post #19

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?

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'…

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.

Re: Show HN: Clothes shopping app UI built in React Native

#24

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?

I personally used redux one time on a project and said, never again.

I wish, but I think my project is too big for me to avoid it.

Re: Show HN: Clothes shopping app UI built in React Native

#26
post #22

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.

My new note to self:

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

It will only make me question everything.

Re: Show HN: Clothes shopping app UI built in React Native

#27

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?

We don't use redux. We are happy using js-data with a rest backend right now. We going to try graph-ql soon.

Re: Show HN: Clothes shopping app UI built in React Native

#28
post #22

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.

My new note to self: Dont read threads about the stack I'm dealing with. It will only make me question everything.

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.

Re: Show HN: Clothes shopping app UI built in React Native

#29

This is really cool! Thanks for releasing it, I love seeing how other people structure medium sized applications. Why'd you pick react native?

Works on android and IOS? Is there anything else that does both?

Not to be cheeky, but why not just react?

Re: Show HN: Clothes shopping app UI built in React Native

#30
post #20

Earlier quoted context omitted.

Every app i've worked on for the last 3 years has fit in one of two categories: 1. Minimal use of Redux 2. Started with Redux, migrating to eliminating Redux. This has mainly been due to using other technologies for dealing with API data (i'm using Relay, but there are other options), and having relatively little need for client-side state that can't be handled at the component level. When I have needed simple shared…

Is Apollo ready for true client side caching these days? I tried it on an app earlier this year with the belief that it would allow me to skip redux and simply keep client state synchronised with the server but without having to load it every time and walked away disappointed. The vision is great though!

As far as Apollo Client is concerned, I don't really know. I keep up-to-date with what's going on, but haven't really used it. Everything i've heard suggests there shouldn't be a problem, but Apollo is really good at marketing.

For Relay you're basically given no caching out of the box, but you can implement it by essentially hijacking the store's garbage collection to use an LRU cache instead of immediately evicting data when its dependents unmount. The developer experience for client-side schema extensions is similarly immature, but it is possible.

If you need all this functionality and aren't comfortable diving into the trenches, you'll have an easier time with Apollo (assuming everything works as advertised).

Post reply on HN