Skip to content

Miroito/capsule-global-state

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capsule Global State

This is an MRE showing an alleged issue with using global state at build time in capsules. Essentially, the capsule needs to be delayed for the build to not panic. From what I have seen, we run into the unreachable case in the global state logic.

Removing the use of global state from the index template lets the developer use the non-delayed capsule.

To run

$ API_URL="Some arbitrary value" perseus serve

To reproduce

in src/templates/index.rs comment/uncomment those 2 lines:

(CAPSULE.delayed_widget(cx,"",())) // This works properly but is unecessarily delayed
// (CAPSULE.widget(cx,"",())) // This makes the build panic when using global state

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages