Friends, the question arose not from scratch. Recently I started designing using Node + React + Redux + Webpack, and something else in their bundle. But basically the problem is in this bundle. I didn’t compile it, I don’t name the variable, I don’t there caused and t d. And so decided to deal with it.

Help to understand:

  1. How to understand this bundle, what privileges does it give us?
  2. If React is a class that implements Custom Elements , then how to understand what Redux is and why I need a Node to use it. Is that Node a native library?
  3. And finally, Webpack. What does socket use? As far as I understand it for live update, there are socket - and. And how does he understand which file we have changed?
  4. Finally, the scss extension, this is a special permission, Node what gets the content as an object?

If you still narrow your horizons, in principle Redux is very incomprehensible. Is it possible to describe it in simple words, well, or with elementary examples for clarity?

Thank.

Closed due to the fact that the issue is too general a participant Nick Volynkin ♦ 4 Aug '16 at 5:28 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • I only know about scss etocc preprocessor, the original name of sass, the scss syntax is slightly different and that's all ... - Ivan Karaman
  • Yes, but somehow you can get its contents in the object view. Where the selector is the key and the rest is Vanya Avchyan
  • Comments are not intended for extended discussion; conversation moved to chat . - Nick Volynkin ♦

1 answer 1

  1. This is a convenient stack for developing applications. Same as, for example, PHP + AngularJS. No one forces you to use it. Node can be replaced by Java, and SCSS by Stylus, for example.

  2. React is not a class, but a library that allows you to write the View of your application, without explicitly limiting it in models and logic.

    Redux is an immutable state storage for your application. Which works very well with React.

    Both React and Redux can be used not only on the client, but also on the server (see isomorphic applications). React - for rendering on the server, Redux - all for the same state storage. Of course, for this, the server must have some kind of JS interpreter, usually NodeJS, but there are deviations.

  3. Webpack, among other things, can work as your local debug development-server, and with live code updates in the browser. So yes - without sockets is difficult here.

    And how does he understand which file we have changed?

    And how do you usually understand that the file has been re-saved? Probably, see the date of the file change.

  4. SCSS is a compiled (translated) language in CSS.

  • At the expense of changing the file. This is understandable. Does it get through the tree every time something? SCSS how does it get the contents of this file? That is, it receives as an object and assigns one or another class. It looks like this const scssObject = rquire ('test.scss') and <MyTag className = {scssObject.update_icon} /> that is we didn't compile it anywhere - Vanya Avchyan
  • 1. Not necessarily. There are operating system level hooks for changing files. 2. Everything is tricky there, depending on how a specific loader for SCSS is implemented in a webpack. Maybe parse the file into an object representation. - Nofate ♦
  • Parsing SCSS in my opinion is a Node feature. Judging by this code const scssObject = rquire ('test.scss') - Vanya Avchyan
  • You are mistaken, read about Webpack and its loaders . - Nofate ♦
  • All thanks on myself :) - Vanya Avchyan