16 Matching Annotations
  1. May 2025
    1. Depending on the type of business you run or the factors affecting your sector, you need to come up with a plan that outlines when you want to launch. Additionally, this plan should account for the amount of time your project will need to address difficult problems.

      From fast rendering to reusable components and unmatched flexibility, React.js is revolutionizing the way modern eCommerce platforms are developed. Whether you're launching a startup or upgrading an enterprise solution, React.js delivers the performance edge your store needs to succeed.

  2. Sep 2022
    1. It works because in JavaScript, true && expression always evaluates to expression, and false && expression always evaluates to false. Therefore, if the condition is true, the element right after && will appear in the output. If it is false, React will ignore and skip it.

      Good example for the {var > 0 %% } type of expression.

    2. In JavaScript, class methods are not bound by default. If you forget to bind this.handleClick and pass it to onClick, this will be undefined when the function is actually called.

      Remember to BIND for Class Components or just USE arrow functions instead.

    3. Do Not Modify State Directly For example, this will not re-render a component: // Wrong this.state.comment = 'Hello'; Instead, use setState(): // Correct this.setState({comment: 'Hello'}); The only place where you can assign this.state is the constructor.

      Change state using setState() or with the hooks, changing the state out of this will NOT re-render the component.

    4. React is pretty flexible but it has a single strict rule: All React components must act like pure functions with respect to their props.

      ALWAYS REMEMBER, keep component props PURE, do NOT change the values of props. Use them and return something new instead.

    5. React treats components starting with lowercase letters as DOM tags. For example, <div /> represents an HTML div tag, but <Welcome /> represents a component and requires Welcome to be in scope.

      Always start component names with a capital letter.

    6. Warning: Since JSX is closer to JavaScript than to HTML, React DOM uses camelCase property naming convention instead of HTML attribute names. For example, class becomes className in JSX, and tabindex becomes tabIndex.

      Threat it more like JS than HTML when it comes to conventions. Keep it camelCase.

  3. Jan 2016
    1. Comparison of AngularJS 2 and ReactJS.

      Angular is a full framework. React is a library. The latter involves more decisions about other packages, and more differences among projects.

      React uses JSX, an HTML-like syntax that compiles to JavaScript. It can tell you where your mistakes are. With Angular, you have to guess.