Skip to content

Commit

Permalink
checking if Component.svelte reflects into budibase
Browse files Browse the repository at this point in the history
  • Loading branch information
chairoi authored Nov 20, 2023
1 parent 74f8be5 commit a9ae41e
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/Component.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,16 @@
import { getContext } from "svelte"
const { styleable } = getContext("sdk")
const component = getContext("component")
const _text;
const importObject = {
env: {
__memory_base: 0,
}
};
WebAssembly.instantiateStreaming(fetch("./side_module.wasm"), importObject).then(result => {
const value = result.instance.exports.Increment(17);
_text = value.toString();
});
function sum() {
return 3 + 2;
}
export let text = _text;
const result = sum();
export let text = result;
</script>

<div use:styleable={$component.styles}>
This is a new-custom component. 17 + 1 is: {text}.
This is a new-custom component. 3 + 2 is: {text}.
</div>

0 comments on commit a9ae41e

Please sign in to comment.