Skip to main content

react_script

Function react_script 

Source
pub fn react_script() -> Markup
Expand description

Renders the <script defer> tag of the island loader.

The tag has the hashed URL, integrity and crossorigin="anonymous". Put it in the <head>.

let html = autumn_plugin_react::react_script().into_string();
assert!(html.contains("/static/_plugins/react/react-islands."), "{html}");
assert!(html.contains(" defer"), "{html}");