Computed Properties in React

added by JavaScript Kicks
8/14/2018 2:30:25 PM

604 Views

Frameworks like Vue have the notion of "computed properties" - a way to derive some new, possibly complex data based on something passed in. This post covers how to achieve the same result in React. The "React way" to handle computing derived data is to compute it in the render method (or in the function body, if it's a stateless component).


0 comments