Live data from Hacker News

Learn React for free

scrimba.com

21–30 of 73 posts

Re: Learn React for free

#21
What on earth is the purpose of non-informative comments from non-informed accounts like these:

- I started listening to this yesterday and really like it! Great, short videos!

- Excellent. Thanks for sharing.

- Great work Bob!

- this is great

The same time you can't find other background info about the company except that they collect VC money and the video's you create are MIT licensed.

Re: Learn React for free

#22

Why would you even pay to learn React? The official doc is free and takes only few hours of reading.

There seems to be a culture of collecting Udemy courses among fledgeling web developers.

Young web developers certainly seem to love video courses for some reason. Maybe I'm just old and crotchety, (well, one of those is certainly true), but I would much rather get my fix textually and go along at my own pace. Flipping pages or scrolling is still superior to trying to scrub through a video timeline.

Re: Learn React for free

#23
post #21

What on earth is the purpose of non-informative comments from non-informed accounts like these: - I started listening to this yesterday and really like it! Great, short videos! - Excellent. Thanks for sharing. - Great work Bob! - this is great The same time you can't find other background info about the company except that they collect VC money and the video's you create are MIT licensed.

What would you like to know about our company?

The accounting for Norwegian companies are public, ours can be found here:

https://www.proff.no/selskap/scrimba-as/oslo/internettdesign...

We're two co-founders, Sindre and I. Our Twitter profiles are here:

https://twitter.com/perborgen https://twitter.com/sindreaars

If you actually spend some time researching, you'll find plenty of information about us and the company.

As for "collecting VC money" we've raised around $250K from angel investors and one Norwegian VC and we've also gotten a loan (which we're partly personally reliable for) from Innovation Norway.

Feel free to ask if you'd like more info.

Re: Learn React for free

#24
Have you listened to the "Why React" video? He says there, repeatedly, that, quote, "For now, it's enough to know that the virtual DOM helps make React work a lot faster than vanilla JavaScript". How can anyone make such a statement and expect to remain a credible source of information? I mean, even if you are targeting complete novices, how?!

Re: Learn React for free

#25

Why would you even pay to learn React? The official doc is free and takes only few hours of reading.

Imagine a brand new developer who started learning JavaScript as their first programming language one month ago. A nice hand-holds video might be perfect for them.

Also, not going to judge a super experienced developer if they just prefer videos for whatever reason.

Re: Learn React for free

#26

Why would you even pay to learn React? The official doc is free and takes only few hours of reading.

I learned most of it myself but bought a Udemy course for Black Friday. I find the docs to be quite confusing to be honest. I know it's not React but Redux's docs aren't great either. Concepts quite hard to understand at first.

I found their docs to be quite good, but I teach the topic and students vary in their responses, so I think it comes down to your approach and previous experience.

React is best to approach the same way you approach functions: You want to have small components, that do one job, that don't interact with outside state (see below for exception), and are largely ignorant of how your app works. The slight exception is container components, where interacting with outside state should be their sole job, encapsulating the application state interactions and passing the info to the contained components so that they don't have to have that knowledge.

I find a top-down approach works well: Break your page into parts (boxes of content), and then break those down, and so forth. Each box of content will be a component - most will contain others, and the smallest will just have on job.

Move all logic except for simple "show/don't show" into outside functions that you import in to your components - React is the View and you don't want it doing nearly as much as it CAN do. Keep it simple, keep it small.

Remember the key rule: You can pass values DOWN (into contained components) but not UP (into your wrapping components). So if you need to send data "up", you need to pass callbacks down and use those callbacks to pass any data "up". This can feel weird, but it helps keep those contained components ignorant of your larger application, which in turn makes them more reliable overtime, as they aren't impacted by changes outside of themselves.

If you have had limited experience with function best practices, or if you've only worked in deeply OOP systems (that have similar best practices but different concepts for passing data), this can be a bit of a struggle to adjust to, but it's actually a very common pattern, and the reason I use React to teach web dev (after teaching basic vanilla JS) - even after React is obsolete these practices will be useful to follow.

I also recommend learning React BEFORE taking on Redux (or any other application state management lib) - even a simple TODO app (don't copy what is out there, write it without hints, then compare) can help clear up the root concepts, and after that application state management is easier to keep distinct in your mind. I took it all on (React + Flux) at once when I started and it took months to grasp because I wasn't keeping them clear from one another. Redux mapXXXXToProps() functions are in fact quite hard to grasp unless you comfortable with how you use React props in practice, at which point they become straightforward.

And lastly, the switching between class-based components and function-based components can be really confusing. I personally prefer to use almost exclusively function-based components, because React is not expecting you to use an OOP approach to the components. I only use class-based components where I need component state (often only the top-level component for small apps) or if I need to use the lifecycle methods (and I rarely do - many examples use didComponentMount to fire off service calls, but I tend to put those into event handlers, though that gets a lot easier when you are using an application state management lib). but if you prefer class-based components, that's fine - just don't think React is using classes for anything more than providing inheritance of the component methods. No OOP-approach to your components.

Hope this helps!

Re: Learn React for free

#27

Why would you even pay to learn React? The official doc is free and takes only few hours of reading.

I think you learn a lot from watching people code that you don't get from their docs.

Here are some examples:

1. Which files do I spend time on and which ones can I ignore? The first time I tried npm I felt like I had to understand all those files that kept popping up.

2. What is a good workflow? None of those documents tell you to open up dev tools and constantly console.log out values, but in a video (I assume) this will come up.

These are two examples but they mostly they show you what you should focus on. There are dozens of little things that you won't pick up from text.

Re: Learn React for free

#29

Why would you even pay to learn React? The official doc is free and takes only few hours of reading.

I learned most of it myself but bought a Udemy course for Black Friday. I find the docs to be quite confusing to be honest. I know it's not React but Redux's docs aren't great either. Concepts quite hard to understand at first.

Redux has the problem that (a) the read-only reducer concept is totally at odds with how a bunch of JS builtins work and so conceptually hard to understand for a newbie, (b) it has just so much boilerplate for "best practices" for even the simplest use case, and (c) it's not immediately clear what the benefits of wrapping your head around all that are.

For me, it took me a while of working on a web app with derived data everywhere (~15 KB raw JSON that gets updated with diffs and recombobulated into different output formats and different intersections of data with live updates), and endless debugging of data transformations by stepping back and forth through the reducer history, before I really "got" it.

On the note of (b), I really like the redux-actions project (https://redux-actions.js.org) for the way its helpers that get rid of most of that. A simple example:

    const setValueA = createAction('SET_VALUE_A');
    const setValueB = createAction('SET_VALUE_B');
    const setValueAB = createAction('SET_VALUE_AB', (a, b) => ({ a, b }));

    export const reducer = combineReducers({
        valueA: handleActions({
            [setValueA]: (state, action) => action.payload
            [setValueAB]: (state, action) => action.payload.a
        }, null),

        valueB: handleActions({
            [setValueB]: (state, action) => action.payload
            [setValueAB]: (state, action) => action.payload.b
        }, null)
    });

Re: Learn React for free

#30

Earlier quoted context omitted.

I learned most of it myself but bought a Udemy course for Black Friday. I find the docs to be quite confusing to be honest. I know it's not React but Redux's docs aren't great either. Concepts quite hard to understand at first.

Redux has the problem that (a) the read-only reducer concept is totally at odds with how a bunch of JS builtins work and so conceptually hard to understand for a newbie, (b) it has just so much boilerplate for "best practices" for even the simplest use case, and (c) it's not immediately clear what the benefits of wrapping your head around all that are. For me, it took me a while of working on a web app with derived d…

We've actually got a new `redux-starter-kit` package which includes some reducer utilities similar to `redux-actions`, but using the Immer library internally. That allows you to write simpler immutable updates that look like "mutation".

There's also some helpers for common use cases like simplifying store setup, and generating entire "slices" of state at once (including generating action creators and action types automatically).

I put together an example of using this the other day:

https://www.reddit.com/r/reactjs/comments/a0b1sa/frustrated_...

Please try it out and let us know what you think!

https://github.com/reduxjs/redux-starter-kit

Post reply on HN