React Rule - UzanR/UzCodingNewLife GitHub Wiki


Attribute rule

  1. class -> className
  2. onclick -> onClick

Component name must start by Capital letter

2 ways to create components

Stateless Functional Component

const DemoComponent = function() {
    return (
        
); };

or

const List = (props) => {
  return 

{}

};

ES6 class

class UzComponent extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
Hello World
); } };

Call Component

    

Render Component

ReactDOM.render(, targetNode)

gggggggggggg

⚠️ **GitHub.com Fallback** ⚠️