Module: React

Defined in:
lib/hyper_react/input_tags.rb,
lib/reactive_record/active_record/reactive_record/while_loading.rb

Overview

Special handling of input tags so they ignore defaultValue (and defaultChecked) values while loading. This is accomplished by adding a react ‘key prop’ that tracks whether the default value is loading. When the default value transitions from loading to loaded the key will be updated causing react to remount the component with the new default value. To handle cases where defaultValue (or defaultChecked) is an expression, a proc (or lambda) can be provided for the default value. The proc will be called, and if it raises the waiting_on_resources flag then we know that within that expression there is a value still being loaded, and the react key will be set accordingly.

Defined Under Namespace

Modules: Component Classes: Element