https://reactjs.org/docs/jsx-in-depth.htmlJSX in DepthHttps://babeljs.io/JS Compiler, learn the direct conversion of react and JS. JSX only supports syntactic sugar syntactic sugar:react.createelement (component, props, ... children) function,JSX Code: MyButton Color ="Blue" shadowsize ={2} >Click Me MyButton> Compi
using Flux to manage route-related data, such as/items/: itemId. It should only be obtained and stored in the state of the component. In this case, it will be destroyed together when the component is destroyed.
For more information about Flux, read The Evolution of Flux Frameworks.
Use Redux
Redux is a predictable state container for JavaScript apps.
If you think you need Flux or similar solutions, you should take a look at redux and learn Dan Abr
: Browser.js is the browser version of Babel, What is Babel?Babel is a JavaScript compilation tool, what do you want to compile the tool for?Look at the source code In See Okay, what if you don't want to use it?Then use the native JS or compiled JS:DOCTYPE HTML>HTMLLang= "en">Head> MetaCharSet= "UTF-8"> title>React Demotitle> Scriptsrc=".. /src/react-0.1
component owns (own) The subcomponents it creates, and with this feature, a complex UI can be split into multiple simple UI components;(2) Reusable (REUSABLE): Each component is a standalone feature that can be used in multiple UI scenarios;(3) maintainable (maintainable): Each small component contains only its own logic, which is easier to understand and maintain;Third, download Reactjs, write Hello,worldReactjs download is very simple, in order to facilitate everyone to download, here again t
React originated from Facebook's internal project. Because the company was dissatisfied with all the JavaScriptMVC frameworks on the market, it decided to write a set of items for setting up Instagram websites. this article introduces React. javaScript achieves native js drag-and-drop effects. If you need to learn it t
formatName(user) { return user.firstName + ' ' + user.lastName;}const user = { firstName: 'Harper', lastName: 'Perez'};const element = ( Inside the JSX, we can execute the method (function) and enter the object. You can output string variables directly, and so on. This is {} similar to the syntax in PHP .3. Jsx defined attribute (Attribute)const element = The JSX attribute definition follows the CamelCase principle. If you define the default properties for HTML tags, you can use the rules
How does programming learn to optimize server-side rendering in node. js? FigureAt Airbnb, we've spent years migrating all of the front-end code to the React architecture, with Ruby on Rails taking up a daily share of the WEB application. In fact, we will soon be turning to another new service that provides full server-side rendering pages via node.
0 reply content: one by one
Front end:
Css:
There is a big pitfall on how to organize the css structure. But there are already some specifications, the most famous oocss Home · stubbornella/oocss Wiki · GitHub
The reuse of css mainly relies on componentization to componentialize common things, such as Button and Dropdown. In the future, add the class.
The Bootstrap structure is quite good. Learn LESS (very simple, one day), read the source code,
In the study of react and webpack, often see in the JS file appears require, there are import, these two are for JS modular programming use. The CSS is@importThe design idea of the 1.ES6 module is to make it as static as possible, so that the dependencies of the module can be determined at compile time, as well as the input and output variables.Require is the COM
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.