Apply the requested view before first paint via a data-view attribute and CSS, and switch views before loading the library.