Hi @jkuester Firstly thanks a ton for your package BS4 and keeping blaze alive!
I just tried to use BlazeBs4, loaded the templates in hello.onCreated, (console even says templates are loaded) but I still get the “no such template” for button.
I see, the guide is missing an important fact here: You need to determine the state if the components are loaded or not and prevent the Template from rendering the button until it’s loaded.
You can use a ReactiveVar for that:
// keep this code outside of Template.onCreated, so it is only called once
const bs4ComponentsLoaded = new ReactiveVar(false)
Promise.all([
BlazeBs4.alert.load(),
BlazeBs4.button.load(),
BlazeBs4.navbar.load(),
]).then(() => bs4ComponentsLoaded.set(true))
Template.hello.helpers({
loadComplete() {
return bs4ComponentsLoaded.get() // will return false until the promise resolved
}
})