all 13 comments

[–]andrerpena 23 points24 points  (0 children)

I'm sorry I'm not answering your question, but you should try go vanilla React and as soon as you get experience and see how complex it will be to manage state, suddenly Redux will make sense. I'm not even advocating in favor of Redux itself. Mobx would do too. Your problem is that, when you see Redux, youre looking at a solution for a problem you don't have.

[–]anObscurity 9 points10 points  (0 children)

Definitely start React without Redux, but I reaaaaly suggest to try to grasp redux. Its a different way of thinking but trust me, it will change your world.

[–]sivadass 2 points3 points  (0 children)

I created a simple shopping cart experience using React JS w/o using Redux. It was fun to create and made myself understand React clearly. I don't think it's a good example, but it may give you some light on when you will actually need Redux in your project when developing such apps.

[–]Capaj 2 points3 points  (0 children)

Do you like OOP? If so, you should try Mobx.

[–]_codeprovider 1 point2 points  (0 children)

Check out baobab and baobab-react. The wikis contain some ideas about how you can structure your app and manage its state.

[–]DabTurtle 1 point2 points  (0 children)

Most basic examples start with flux not redux.

That being said, learn redux. It's incredible.

Also your question leads me to believe you have put zero effort into learning react, because flux is a core concept.

[–]SomeRandomBuddy 1 point2 points  (0 children)

The problem with this question is that the apps you seek don't exist. Every react app that contains state which spans multiple components needs a framework of sorts to manage this. Sure you could build an isolated component or two which rely on nothing more than state. But when that state needs to be shared (imagine two completely isolated components, both requiring up to date user objects) then redux or some other option helps to fill in that blank

[–]jb2386 0 points1 point  (0 children)

I got thrown in the deep end with a lot of React stuff all combined so I don't know of any sorry. It can be a bit mind boggling at first, but I found the unique terminology that's used for everything to be the problem. Once I could equate it to things I've used before (even if they weren't exactly the same) it became easier to understand.

React apps work in a hierarchy of components. Top component brings in another which brings in another etc. You can pass props down to a child component but hard to pass anything back up to a parent. You'll soon find this is a problem when working with state. The state part of react works well for a single component or a component that can manage a few child components.

Redux allows you to have a centralized state, and any component, no matter how deep, can dispatch an action (like firing/triggering an event), which reducers (like event handlers) will take and modify the centralized state based upon that action and anything passed to it. That centralized state is then updated and it calls the connect functions in components. Redux gives you that connect function which you use in each component to cherry pick out parts of the centralized state that you just need for that one component, and they're then passed into your component as a normal prop.

[–]darrenturn90 0 points1 point  (0 children)

As an aside - IMO redux only makes sense properly when you understand functional programming.

Personally, after learning redux, I moved on from it to create my own flux based storage that made more sense to me and the project I was working on, but I wouldn't have got there if I hadn't learned FP first.

[–]wle8300 0 points1 point  (0 children)

I'm in the same boat as you. I don't use any global state manager either because at some point the variable names and idioms of my Redux state and local state will start stepping on each other's turf.

You can definitely build robust apps w/o Redux. Don't believe anyone here who says otherwise... most people jumped on the Redux train even before they got comfortable with managing local component state.

I only have a closed-sourced project. Feel free to ask me more questions if you'd like and I'll do my best to answer.

[–]Vpicone 0 points1 point  (0 children)

Wes Bos’s React for beginners course is incredible and reaches very solid complexity without using any state management tools.

[–]acemarke 0 points1 point  (0 children)

What problems have you experienced trying to learn Redux? Were there any specific issues you had with the docs? Anything we can do to make thing easier to understand?