receiving

Invoked before the component receives props.

Parameters

  • props : object The props.

Returns

object The modified props

Example

import { Component } from "combo-js";

const Example = new class extends Component {
    receiving() {
        return {
            text: "New value"
        }
    }
    render() {
        return `
            ${this.props.text}
        `;
}();

Example.mount(document.getElementById("root"), {
    text: "Passed value"
});

Notes

Used to safely manipulate props before the component is mounted.

Last updated