Live data from Hacker News

Free React.js Fundamentals Course

courses.reactjsprogram.com

41–50 of 117 posts

Re: Free React.js Fundamentals Course

#42
post #30

Really can't decide to go ahead with an Angular approach (2.0) or use React. I know React is only for the view layer so what are people using with React to do stuff like api calls?

We're moving all our Angular code to React/Redux. Angular 2.0 seemed quite a bit more convoluted than React, even if it is saner than Angular 1.x.

Having simple and easy to create components is a major win. No one on my team ever liked or used directives much, as they were overly complicated.

Redux has been a huge win. In dev builds, every state change is output via a redux middleware, so it is easy to watch how state updates and transitions. In prod we plan on storing state updates and allowing them to be sent to support for trouble shooting. Even have plans for an overlay to allow support to step through those changes with a simple interface.

Re: Free React.js Fundamentals Course

#43
post #40
post #30

Really can't decide to go ahead with an Angular approach (2.0) or use React. I know React is only for the view layer so what are people using with React to do stuff like api calls?

Here's a look at the folder structure we're using for our app: https://i.imgur.com/wc7DyOA.png /actions: Flux action creators /components: These are all the JSX React components (the presentation layer) - so there are subfolders like "pages", "controls", etc. /reducers: These are Redux reducers - they're the logic that handles all of the application state /services: This is what your question was really about. We use…

Really, really helpful - thanks!

Re: Free React.js Fundamentals Course

#44
post #30

Really can't decide to go ahead with an Angular approach (2.0) or use React. I know React is only for the view layer so what are people using with React to do stuff like api calls?

I spent a month playing with the different libraries and settled on the following core modules for my frontend:

* redux: Keeps track of all the state (UI and domain) in a single object.

* immutable.js: Obviously for the immutable data structures which plays nicely within the React ecosystem. It also has a rich set of data structures that aren't found natively within JavaScript. For example I make heavy use of Records to simulate domain models.

* react-router: For routing within the application.

* superagent: For ajax calls.

* reselect: If using redux you'll cherry pick various parts of the state tree for your components. If any of the data used within components can be derived then reselect comes into play nicely.

It took longer than I had hoped but I finally have a strong set of libraries and project layout I'm happy and productive with.

Re: Free React.js Fundamentals Course

#46
post #30

Really can't decide to go ahead with an Angular approach (2.0) or use React. I know React is only for the view layer so what are people using with React to do stuff like api calls?

I spent a month playing with the different libraries and settled on the following core modules for my frontend: * redux: Keeps track of all the state (UI and domain) in a single object. * immutable.js: Obviously for the immutable data structures which plays nicely within the React ecosystem. It also has a rich set of data structures that aren't found natively within JavaScript. For example I make heavy use of Records…

Why not socket.io for ajax calls?

Re: Free React.js Fundamentals Course

#47
Login problems: at http://courses.reactjsprogram.com/courses/enrolled I'm logged in, then I click on the course and go to http://courses.reactjsprogram.com/courses/reactjsfundamental... and I'm logged in. Then I click any of the Start buttons and I'm not logged in anymore (Lecture contents locked - Enroll in Course to Unlock).

Opera on Android, cookies enabled; Adblock Plus enabled or disabled, no changes.

Edit: I checked with Firefox and Opera on Ubuntu and it works.

Re: Free React.js Fundamentals Course

#48
post #45

Is anyone using React with .Net ( http://reactjs.net )? If so how has your experience been? This would seem to fit well with a MVC WebApi backend.

We're using React/Redux to replace our Angular front end to MVC WebAPI. But we're also slowly replacing our MVC WebAPI backend to Node.js/Express. AD, LDAP, Tedious-Pooling, etc make it work perfectly in our MS environment.

Re: Free React.js Fundamentals Course

#49
post #46

Earlier quoted context omitted.

I spent a month playing with the different libraries and settled on the following core modules for my frontend: * redux: Keeps track of all the state (UI and domain) in a single object. * immutable.js: Obviously for the immutable data structures which plays nicely within the React ecosystem. It also has a rich set of data structures that aren't found natively within JavaScript. For example I make heavy use of Records…

Why not socket.io for ajax calls?

I primarily use Django/Django Rest Framework as the back end so web-sockets are a pain right now. I'm looking forward to when Andrew Godwin's channel work gets into Django proper where socket.io would make a lot of sense. Unless I'm missing something and socket.io does ajax requests these days? I haven't used it in quite some time.

Re: Free React.js Fundamentals Course

#50
post #40
post #30

Really can't decide to go ahead with an Angular approach (2.0) or use React. I know React is only for the view layer so what are people using with React to do stuff like api calls?

Here's a look at the folder structure we're using for our app: https://i.imgur.com/wc7DyOA.png /actions: Flux action creators /components: These are all the JSX React components (the presentation layer) - so there are subfolders like "pages", "controls", etc. /reducers: These are Redux reducers - they're the logic that handles all of the application state /services: This is what your question was really about. We use…

For a beginner to react like me, this is INVALUABLE. Thanks :)
Post reply on HN