Can we force a component to re-render without calling setState() method in ReactJS?

By default, when our component’s state or props change, our component will re-render. If our render() method depends on some other data, we can tell React that the component needs re-rendering by calling forceUpdate().

component.forceUpdate(callback)

It is recommended to avoid all uses of forceUpdate() and only read from this.props and this.state in render().