reactive functions inside components