S
SolidJS3mo ago
Misery

Foreign data not rendering unless page is reloaded

I'm trying to write a FFI bridge thingy between rust and typescript (bun, specifically) and I was wondering why my backend's version isnt loading when i go to the About page:
export function getBackendVersion(): string {
return dms_version().toString();
}
export function getBackendVersion(): string {
return dms_version().toString();
}
Here dms_version is a foreign function that grab's my rust lib's version and misc information for displaying. But when I use it:
import { Title } from "@solidjs/meta";
import { getBackendVersion } from "~/rust";

export default function About() {
return (
<main>
<Title>About MCS</Title>
<p>Running {getBackendVersion()}</p>
</main>
);
}
import { Title } from "@solidjs/meta";
import { getBackendVersion } from "~/rust";

export default function About() {
return (
<main>
<Title>About MCS</Title>
<p>Running {getBackendVersion()}</p>
</main>
);
}
The Running {getBackendVersion()} only appears if i reload the webpage. Is there any reason behind this?
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server