How to Pass In a React Component’s Content into Another React Component using props.children

Posted by & filed under Components, React Advanced.

1 minute read In React Components we can make use of the children (props.children) to pass content from one component to another.We need to make use of the Component API and make use of the props. It doesn’t matter if you have a class component or function component, the props should never change. Props are Read-Only. Code example… Read more »

React component lifecycle

Posted by & filed under React Fundamentals, React Lifecycle.

6 minutes read Definition of component lifecycle The React component lifecycle represents the flow of events which a React component goes through during its lifetime. For more details about components types or an in-depth explanation of React components. Major changes to the React component lifecycle were added with ReactJS 16.3. Some lifecycle methods have been deprecated while new… Read more »

How to use JSX in React Components?

Posted by & filed under JSX, React Advanced.

3 minutes read For a basic JSX introduction you can check our previous article, Introduction to JSX. JSX is actually syntactic sugar for defining components using the React.createElement(component, props, …children) function and positioning them inside the markup. This is how you write a simple component in JSX and how Babel compiles it: JSX code: <div className=”container”> Hello World!… Read more »

What is JSX?

Posted by & filed under JSX, React Advanced.

2 minutes read JSX is JavaScript with XML, still just JavaScript but with some extra functionality. The code written with JSX is looks very similar to HTML or XML, but the power comes from easily mixing JavaScript methods and properties with your HTML look-alike code. Note React can work fine without JSX, however writing React components with JSX,… Read more »