We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for some reason, the following snippets of code sometimes log [Function: foo] (as expected) and sometimes log undefined
// file: ./server/main.ts export function foo(): string { return "bar"; }
// file: ./src/main.tsx import { Devvit } from "@devvit/public-api"; import { foo } from "../server/main.js"; Devvit.configure({ redditAPI: true, }); Devvit.addMenuItem({ label: "Create minigames post", location: "subreddit", forUserType: "moderator", onPress: async (_event, { reddit, ui }) => { await reddit.submitPost({ title: "title", subredditName: (await reddit.getCurrentSubreddit()).name, preview: ( <vstack height="100%" width="100%" alignment="middle center"> <text size="large">Loading...</text> </vstack> ), }); ui.showToast({ text: "Created post!" }); }, }); Devvit.addCustomPostType({ name: "Experience Post", render: _context => { console.log(foo); // sometimes logs [Function: foo] and sometimes logs undefined return <text>lorem ipsum dolor sit amet</text>; }, }); export default Devvit;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
for some reason, the following snippets of code sometimes log [Function: foo] (as expected) and sometimes log undefined
The text was updated successfully, but these errors were encountered: