Skip to main contentdfsdf

Robert Sutor

Colloquium: Sergey Bravyi | Institute for Quantum Computing

"I will discuss classical and quantum algorithms for simulation of quantum impurity models. Such models describe a bath of free fermions coupled to a small interacting subsystem called an impurity. Hamiltonians of this form were famously studied by Anderson, Kondo, Wilson and others in 1960s."

Shared by Robert Sutor, 1 save total

Robert Sutor

Take Feta. Add Frites. Stir in European Food Rules. Fight. - The New York Times

"Fights over culinary traditions are common in Europe, where countries are fiercely protective of their gastronomical heritage, and the rule books are full of regional food and drink that are “protected.”"

Shared by Robert Sutor, 3 saves total

Jeremy Gollehon
  • What are Function as Child Components?

    “Function as Child Component”s are components that receive a function as their child. The pattern is simply implemented and enforced thanks to React’s property types.

    class MyComponent extends React.Component { 
    render() {
    return (
    <div>
    {this.props.children('Scuba Steve')}
    </div>
    );
    }
    }
    MyComponent.propTypes = {
    children: React.PropTypes.func.isRequired,
    };

    That is it! By using a Function as Child Component we decouple our parent component and our child component letting the composer decide what & how to apply parameters to the child component.

Jeremy Gollehon
  • State is similar to props, but it is private and fully controlled by the component.

      

    We mentioned before that components defined as classes have some additional features. Local state is exactly that: a feature available only to classes.

    • You can convert a functional component like Clock to a class in five steps:

        
         
      1. Create an ES6 class with the same name that extends React.Component.

      2.  
      3. Add a single empty method to it called render().

      4.  
      5. Move the body of the function into the render() method.

      6.  
      7. Replace props with this.props in the render() body.

      8.  
      9. Delete the remaining empty function declaration.

      10.  
       
      class Clock extends React.Component {   render() {     return (       <div>         <h1>Hello, world!</h1>         <h2>It is {this.props.date.toLocaleTimeString()}.</h2>       </div>     );   } }
  • Adding Lifecycle Methods to a Class #

     

    In applications with many components, it's very important to free up resources taken by the components when they are destroyed.

6 more annotations...

Jeremy Gollehon
  • If you try to mutate state directly, it will fail. With the other approaches above, it’s easy to forget, and React won’t warn you when you mutate state directly.
Jeremy Gollehon
  • In 2016, the farmer became interested in A2/A2 cow’s milk. This interest arose from two experiences: (1) The farmer noticed that the calves fed A2/A2 cow’s milk grew faster and did not get diarrhea; and (2) The farmer’s baby Hannah was quite unhappy and did not want her formula until the family starting using A2/A2 cow’s milk. After switching to A2/A2 cow’s milk, she immediately took the bottle and was very content and happy!
  • All of our products are chemical-free, GMO-free, antibiotic-free, hormone-free, and soy-free.
Show more items

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo