001package react4j.dom.proptypes.html; 002 003import javax.annotation.Nullable; 004import jsinterop.annotations.JsFunction; 005 006/** 007 * Method to pass an element or component instance back from the renderer. 008 */ 009@JsFunction 010@FunctionalInterface 011public interface RefConsumer 012{ 013 /** 014 * Passes the reference to the component instance or element. 015 * The reference is nonnull when the element has been attached to the DOM and 016 * null when the reference has been detached from the DOM. 017 * 018 * @param reference the reference. 019 */ 020 void accept( @Nullable Object reference ); 021}