Oh wait ya I just realized that too. I should just use my actual code instead of trying to simplify my problem.
I am doing this:
api.decorateWidget('post-meta-data:after', dec => {
const attrs = dec.attrs;
function passViews(views) {
//views is successfully passed to this function from getJSON
console.log(views);
//the below vDom test element does NOT attach as expected
return h('i.fa.fa-eye'));
}
$.getJSON(attrs.topicUrl + '.json', function (data) {
//passing function to success because ultimately I want to
// get the topic views
success: passViews(data.views);
});
});