/** * expr can be used to create temporarily views inside views. * This can be improved to improve performance if a value changes often, but usually doesn't affect the outcome of an expression. * * In the following example the expression prevents that a component is rerender _each time_ the selection changes; * instead it will only rerenders when the current todo is (de)selected. * * reactiveComponent((props) => { * const todo = props.todo; * const isSelected = mobx.expr(() => props.viewState.selection === todo); * return
{todo.title}
* }); * */ export declare function expr(expr: () => T, scope?: any): T;