From 064c40f591b55ae5223c22f422090b99731ba23e Mon Sep 17 00:00:00 2001 From: Dikran Samarjian Date: Sun, 1 Mar 2026 22:40:03 -0800 Subject: [PATCH] added addCustomPostType depreciation notices --- docs/api/public-api/classes/Devvit.md | 5 +++++ docs/blocks/button.mdx | 1 + docs/blocks/image.mdx | 1 + docs/capabilities/blocks/app_image_assets.md | 1 + docs/capabilities/blocks/dimensions.md | 6 ++++++ docs/capabilities/blocks/working_with_useasync.md | 1 + docs/capabilities/blocks/working_with_useinterval.md | 1 + docs/capabilities/blocks/working_with_usestate.md | 1 + docs/capabilities/client/forms.mdx | 2 ++ docs/capabilities/client/navigation.mdx | 1 + docs/capabilities/client/overview.mdx | 1 + docs/capabilities/client/toasts.mdx | 1 + docs/capabilities/server/cache-helper.mdx | 1 + docs/capabilities/server/post-data.mdx | 2 ++ docs/capabilities/server/settings-and-secrets.mdx | 2 ++ docs/earn-money/payments/support_this_app.md | 1 + docs/guides/tools/devvit_cli.mdx | 1 + .../version-0.11/api/public-api/classes/Devvit.md | 5 +++++ versioned_docs/version-0.11/app_image_assets.md | 1 + versioned_docs/version-0.11/blocks/button.mdx | 1 + versioned_docs/version-0.11/blocks/image.mdx | 1 + versioned_docs/version-0.11/capabilities/adding-links.mdx | 1 + versioned_docs/version-0.11/capabilities/cache.md | 1 + versioned_docs/version-0.11/capabilities/forms.md | 2 ++ .../version-0.11/capabilities/secrets-storage.md | 1 + .../version-0.11/capabilities/server-side-functions.md | 1 + versioned_docs/version-0.11/capabilities/userActions.md | 1 + versioned_docs/version-0.11/custom_post_form.md | 4 ++++ versioned_docs/version-0.11/custom_post_usage.md | 5 +++++ versioned_docs/version-0.11/devvit.kit.md | 1 + versioned_docs/version-0.11/devvit_cli.md | 1 + versioned_docs/version-0.11/devvit_for_pythonistas.md | 5 +++++ versioned_docs/version-0.11/devvit_kit.md | 1 + versioned_docs/version-0.11/dimensions.md | 2 ++ versioned_docs/version-0.11/interactive_posts.md | 6 ++++++ versioned_docs/version-0.11/payments/support_this_app.md | 1 + versioned_docs/version-0.11/post_size.md | 7 +++++++ versioned_docs/version-0.11/webviews.md | 4 ++++ versioned_docs/version-0.11/working_with_useasync.md | 1 + versioned_docs/version-0.11/working_with_useinterval.md | 1 + versioned_docs/version-0.11/working_with_usestate.md | 1 + .../version-0.12/api/public-api/classes/Devvit.md | 4 ++++ versioned_docs/version-0.12/blocks/button.mdx | 1 + versioned_docs/version-0.12/blocks/image.mdx | 1 + .../version-0.12/capabilities/blocks/app_image_assets.md | 1 + .../version-0.12/capabilities/blocks/dimensions.md | 6 ++++++ .../capabilities/blocks/working_with_useasync.md | 1 + .../capabilities/blocks/working_with_useinterval.md | 1 + .../capabilities/blocks/working_with_usestate.md | 1 + versioned_docs/version-0.12/capabilities/client/forms.mdx | 2 ++ .../version-0.12/capabilities/client/navigation.mdx | 1 + .../version-0.12/capabilities/client/overview.mdx | 1 + versioned_docs/version-0.12/capabilities/client/toasts.mdx | 1 + .../version-0.12/capabilities/server/cache-helper.mdx | 1 + .../version-0.12/capabilities/server/post-data.mdx | 2 ++ .../capabilities/server/settings-and-secrets.mdx | 2 ++ .../version-0.12/earn-money/payments/support_this_app.md | 1 + versioned_docs/version-0.12/guides/tools/devvit_cli.mdx | 1 + 58 files changed, 112 insertions(+) diff --git a/docs/api/public-api/classes/Devvit.md b/docs/api/public-api/classes/Devvit.md index 62f13ea8..c141d1f9 100644 --- a/docs/api/public-api/classes/Devvit.md +++ b/docs/api/public-api/classes/Devvit.md @@ -22,6 +22,10 @@ ### addCustomPostType() +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + > `static` **addCustomPostType**(`customPostType`): `void` Add a custom post type for your app. @@ -43,6 +47,7 @@ The custom post type to add. ```ts import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Counter', description: 'A simple click counter post.', diff --git a/docs/blocks/button.mdx b/docs/blocks/button.mdx index d76e60c1..5f7533f5 100644 --- a/docs/blocks/button.mdx +++ b/docs/blocks/button.mdx @@ -163,6 +163,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/docs/blocks/image.mdx b/docs/blocks/image.mdx index bffda606..15da858a 100644 --- a/docs/blocks/image.mdx +++ b/docs/blocks/image.mdx @@ -183,6 +183,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/docs/capabilities/blocks/app_image_assets.md b/docs/capabilities/blocks/app_image_assets.md index dfb5ea3f..8081eb47 100644 --- a/docs/capabilities/blocks/app_image_assets.md +++ b/docs/capabilities/blocks/app_image_assets.md @@ -65,6 +65,7 @@ const render: Devvit.CustomPostComponent = () => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My custom post', description: 'Test custom post for showing a custom asset!', diff --git a/docs/capabilities/blocks/dimensions.md b/docs/capabilities/blocks/dimensions.md index 15c69d99..a2404f21 100644 --- a/docs/capabilities/blocks/dimensions.md +++ b/docs/capabilities/blocks/dimensions.md @@ -15,6 +15,10 @@ You can use dimensions to: ## Getting dimensions +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + Dimension information is specified in density-independent pixels. These pixel units are located on the context object. | Dimension | Description | @@ -28,6 +32,7 @@ Dimension information is specified in density-independent pixels. These pixel un This example shows a custom post that specifies dimensions. ```tsx +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Dimensions app', render: (context) => { @@ -53,6 +58,7 @@ export const MyHeader: Devvit.BlockComponent = (props, context) => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (_context) => { diff --git a/docs/capabilities/blocks/working_with_useasync.md b/docs/capabilities/blocks/working_with_useasync.md index 8fdc1c6f..04044432 100644 --- a/docs/capabilities/blocks/working_with_useasync.md +++ b/docs/capabilities/blocks/working_with_useasync.md @@ -154,6 +154,7 @@ const App = () => { }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Using useAsync with XKCD API', diff --git a/docs/capabilities/blocks/working_with_useinterval.md b/docs/capabilities/blocks/working_with_useinterval.md index fec6e5db..18285113 100644 --- a/docs/capabilities/blocks/working_with_useinterval.md +++ b/docs/capabilities/blocks/working_with_useinterval.md @@ -59,6 +59,7 @@ function getCurrentTime() { return `${hours}:${minutes}:${seconds}`; } +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Clock', render: (context) => { diff --git a/docs/capabilities/blocks/working_with_usestate.md b/docs/capabilities/blocks/working_with_usestate.md index b1b7db19..be09c064 100644 --- a/docs/capabilities/blocks/working_with_usestate.md +++ b/docs/capabilities/blocks/working_with_usestate.md @@ -144,6 +144,7 @@ const CountPage: Devvit.BlockComponent = ({ navigate, setCount, count }, }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Navigate between pages and count!', diff --git a/docs/capabilities/client/forms.mdx b/docs/capabilities/client/forms.mdx index 5dea0dd8..78e2ff36 100644 --- a/docs/capabilities/client/forms.mdx +++ b/docs/capabilities/client/forms.mdx @@ -77,6 +77,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi import { Devvit, useState, useForm } from '@devvit/public-api'; // Interactive post with form + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'FormExample', render: (context) => { @@ -1048,6 +1049,7 @@ Below is a collection of common use cases and patterns. redditAPI: true, }); + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Multi-step Form', render: (context) => { diff --git a/docs/capabilities/client/navigation.mdx b/docs/capabilities/client/navigation.mdx index 3f2b3bd9..859d097e 100644 --- a/docs/capabilities/client/navigation.mdx +++ b/docs/capabilities/client/navigation.mdx @@ -93,6 +93,7 @@ When linking to Reddit content, the navigation function requires the app account }); // Interactive post with navigation + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Navigation Post', render: (context) => { diff --git a/docs/capabilities/client/overview.mdx b/docs/capabilities/client/overview.mdx index 837a6f57..508156a6 100644 --- a/docs/capabilities/client/overview.mdx +++ b/docs/capabilities/client/overview.mdx @@ -46,6 +46,7 @@ Client-side effects enable your Devvit app to provide interactive feedback and n import { Devvit } from '@devvit/public-api'; // In a custom post component + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Interactive Post', render: (context) => { diff --git a/docs/capabilities/client/toasts.mdx b/docs/capabilities/client/toasts.mdx index 0bec1edb..580543f1 100644 --- a/docs/capabilities/client/toasts.mdx +++ b/docs/capabilities/client/toasts.mdx @@ -93,6 +93,7 @@ Toasts will not work from scheduled jobs or triggers. }); // Example in blocks + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post', render: (context) => { diff --git a/docs/capabilities/server/cache-helper.mdx b/docs/capabilities/server/cache-helper.mdx index 3e380079..894e2969 100644 --- a/docs/capabilities/server/cache-helper.mdx +++ b/docs/capabilities/server/cache-helper.mdx @@ -238,6 +238,7 @@ Here’s a way to set up in-app caching instead of using scheduler or interval t // other capabilities }); + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (context) => { diff --git a/docs/capabilities/server/post-data.mdx b/docs/capabilities/server/post-data.mdx index ac2f09f4..3e8a22ed 100644 --- a/docs/capabilities/server/post-data.mdx +++ b/docs/capabilities/server/post-data.mdx @@ -310,6 +310,7 @@ To update post data after creation, fetch the post and use the `setPostData()` m ```ts title="main.tsx" import { Devvit, useForm } from '@devvit/public-api'; + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'InteractivePost', render: (context) => { @@ -378,6 +379,7 @@ Post data is available through `context.postData` in both client and server cont ```tsx title="main.tsx" import { Devvit } from '@devvit/public-api'; + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'MyCustomPost', render: (context) => { diff --git a/docs/capabilities/server/settings-and-secrets.mdx b/docs/capabilities/server/settings-and-secrets.mdx index 2c7804fe..5b3d6909 100644 --- a/docs/capabilities/server/settings-and-secrets.mdx +++ b/docs/capabilities/server/settings-and-secrets.mdx @@ -293,6 +293,7 @@ Settings can be retrieved from within your app. }); // Access in custom post type + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'ConfigurablePost', render: (context) => { @@ -620,6 +621,7 @@ Here's a complete example showing both secrets and subreddit settings in action: return data.choices[0]?.message?.content || 'No response'; } + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AI Assistant', render: (context) => { diff --git a/docs/earn-money/payments/support_this_app.md b/docs/earn-money/payments/support_this_app.md index 242ac04a..e17dc830 100644 --- a/docs/earn-money/payments/support_this_app.md +++ b/docs/earn-money/payments/support_this_app.md @@ -58,6 +58,7 @@ import { usePayments, useProducts } from '@devvit/payments'; import { ProductButton } from '@devvit/payments/helpers/ProductButton'; import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ render: (context) => { const { products } = useProducts(context); diff --git a/docs/guides/tools/devvit_cli.mdx b/docs/guides/tools/devvit_cli.mdx index 91596411..436ebd53 100644 --- a/docs/guides/tools/devvit_cli.mdx +++ b/docs/guides/tools/devvit_cli.mdx @@ -38,6 +38,7 @@ $ npx devvit create icons "src/my-icons.ts" import { Devvit } from '@devvit/public-api'; import Icons from './my-icons.ts'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'my-custom-post', render: (_context) => { diff --git a/versioned_docs/version-0.11/api/public-api/classes/Devvit.md b/versioned_docs/version-0.11/api/public-api/classes/Devvit.md index fb4e3e1c..7b8b4b35 100644 --- a/versioned_docs/version-0.11/api/public-api/classes/Devvit.md +++ b/versioned_docs/version-0.11/api/public-api/classes/Devvit.md @@ -18,6 +18,10 @@ ## Methods +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + ### addCustomPostType() @@ -43,6 +47,7 @@ The custom post type to add. ```ts import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Counter', description: 'A simple click counter post.', diff --git a/versioned_docs/version-0.11/app_image_assets.md b/versioned_docs/version-0.11/app_image_assets.md index 1142af15..3ae832e0 100644 --- a/versioned_docs/version-0.11/app_image_assets.md +++ b/versioned_docs/version-0.11/app_image_assets.md @@ -65,6 +65,7 @@ const render: Devvit.CustomPostComponent = () => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My custom post', description: 'Test custom post for showing a custom asset!', diff --git a/versioned_docs/version-0.11/blocks/button.mdx b/versioned_docs/version-0.11/blocks/button.mdx index d76e60c1..5f7533f5 100644 --- a/versioned_docs/version-0.11/blocks/button.mdx +++ b/versioned_docs/version-0.11/blocks/button.mdx @@ -163,6 +163,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/versioned_docs/version-0.11/blocks/image.mdx b/versioned_docs/version-0.11/blocks/image.mdx index bffda606..15da858a 100644 --- a/versioned_docs/version-0.11/blocks/image.mdx +++ b/versioned_docs/version-0.11/blocks/image.mdx @@ -183,6 +183,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/versioned_docs/version-0.11/capabilities/adding-links.mdx b/versioned_docs/version-0.11/capabilities/adding-links.mdx index 527030cc..c72d6bf5 100644 --- a/versioned_docs/version-0.11/capabilities/adding-links.mdx +++ b/versioned_docs/version-0.11/capabilities/adding-links.mdx @@ -102,6 +102,7 @@ import { Devvit } from '@devvit/public-api'; Devvit.configure({ redditAPI: true }); // Interactive post definition +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (context) => { diff --git a/versioned_docs/version-0.11/capabilities/cache.md b/versioned_docs/version-0.11/capabilities/cache.md index b8973d11..80a1980d 100644 --- a/versioned_docs/version-0.11/capabilities/cache.md +++ b/versioned_docs/version-0.11/capabilities/cache.md @@ -41,6 +41,7 @@ Devvit.configure({ // other capabilities }); +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (context) => { diff --git a/versioned_docs/version-0.11/capabilities/forms.md b/versioned_docs/version-0.11/capabilities/forms.md index 1add741e..ee75cac4 100644 --- a/versioned_docs/version-0.11/capabilities/forms.md +++ b/versioned_docs/version-0.11/capabilities/forms.md @@ -19,6 +19,7 @@ This example shows an interactive post with a text label and a button that trigg ```tsx import { Devvit, useState, useForm } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'TemplateName', render: (context) => { @@ -522,6 +523,7 @@ Devvit.configure({ redditAPI: true, }); +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Multi-step Form', render: (context) => { diff --git a/versioned_docs/version-0.11/capabilities/secrets-storage.md b/versioned_docs/version-0.11/capabilities/secrets-storage.md index f16b2f0c..0ee25c75 100644 --- a/versioned_docs/version-0.11/capabilities/secrets-storage.md +++ b/versioned_docs/version-0.11/capabilities/secrets-storage.md @@ -103,6 +103,7 @@ async function fetchResponse(context: Devvit.Context): Promise { } } +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Devvit - Ask GPT', render: (context) => { diff --git a/versioned_docs/version-0.11/capabilities/server-side-functions.md b/versioned_docs/version-0.11/capabilities/server-side-functions.md index 5182f031..cc61281f 100644 --- a/versioned_docs/version-0.11/capabilities/server-side-functions.md +++ b/versioned_docs/version-0.11/capabilities/server-side-functions.md @@ -31,6 +31,7 @@ Devvit.configure({ http: true, }); +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Random Number Generator', render: () => { diff --git a/versioned_docs/version-0.11/capabilities/userActions.md b/versioned_docs/version-0.11/capabilities/userActions.md index 597ec718..a0d98a9a 100644 --- a/versioned_docs/version-0.11/capabilities/userActions.md +++ b/versioned_docs/version-0.11/capabilities/userActions.md @@ -96,6 +96,7 @@ Devvit.addMenuItem({ }, }); +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Favorite color post', render: (context) => { diff --git a/versioned_docs/version-0.11/custom_post_form.md b/versioned_docs/version-0.11/custom_post_form.md index bba10910..39b17c40 100644 --- a/versioned_docs/version-0.11/custom_post_form.md +++ b/versioned_docs/version-0.11/custom_post_form.md @@ -57,6 +57,8 @@ Copy and paste the following code snippets into your `main.tsx` file below the i 6. Create a custom post component. ```jsx + +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', render: () => { @@ -76,6 +78,7 @@ Devvit.addCustomPostType({ ```jsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', render: (context) => { @@ -100,6 +103,7 @@ Devvit.addCustomPostType({ ```tsx import { Devvit, useState, useForm } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', render: (context) => { diff --git a/versioned_docs/version-0.11/custom_post_usage.md b/versioned_docs/version-0.11/custom_post_usage.md index 23e75845..b54514eb 100644 --- a/versioned_docs/version-0.11/custom_post_usage.md +++ b/versioned_docs/version-0.11/custom_post_usage.md @@ -10,6 +10,10 @@ Want to know more about custom posts? You’re in the right place. This page wil Custom posts need a definition for the post type and the post loading state: +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + - The `addCustomPostType()` method defines the custom post type. - The `submitPost()` method instantiates the post and defines the loading state. @@ -30,6 +34,7 @@ The UI is wrapped in ``. If you don’t include them, `` will be **Example** ```tsx +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', description: 'A big hello text.', diff --git a/versioned_docs/version-0.11/devvit.kit.md b/versioned_docs/version-0.11/devvit.kit.md index c30f79e3..9d533a98 100644 --- a/versioned_docs/version-0.11/devvit.kit.md +++ b/versioned_docs/version-0.11/devvit.kit.md @@ -21,6 +21,7 @@ Once @devvit/kit is installed, you can use the components in your app. This exam import { Devvit } from '@devvit/public-api'; import { Columns } from '@devvit/kit'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Columns static content', render: () => { diff --git a/versioned_docs/version-0.11/devvit_cli.md b/versioned_docs/version-0.11/devvit_cli.md index ee5c80ea..76170745 100644 --- a/versioned_docs/version-0.11/devvit_cli.md +++ b/versioned_docs/version-0.11/devvit_cli.md @@ -36,6 +36,7 @@ $ devvit create icons "src/my-icons.ts" import { Devvit } from "@devvit/public-api"; import Icons from "./my-icons.ts"; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: "my-custom-post", render: (_context) => { diff --git a/versioned_docs/version-0.11/devvit_for_pythonistas.md b/versioned_docs/version-0.11/devvit_for_pythonistas.md index 4d3a0d4e..f7513377 100644 --- a/versioned_docs/version-0.11/devvit_for_pythonistas.md +++ b/versioned_docs/version-0.11/devvit_for_pythonistas.md @@ -15,6 +15,7 @@ Let's start with a simple "Hello World" app using the Devvit playground, which i ```tsx import { Devvit, useState } from '@devvit/public-api'; + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { @@ -126,6 +127,10 @@ Let's break down the code you just wrote. Think of Typescript as Python's cousin ### Creating an interactive post +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + - **`Devvit.addCustomPostType({...})`:** This tells Devvit you're creating a new type of post on Reddit. - **`name: 'Say Hello'`:** This gives your post type a name. diff --git a/versioned_docs/version-0.11/devvit_kit.md b/versioned_docs/version-0.11/devvit_kit.md index fc2cb4d4..142a41c7 100644 --- a/versioned_docs/version-0.11/devvit_kit.md +++ b/versioned_docs/version-0.11/devvit_kit.md @@ -20,6 +20,7 @@ Once @devvit/kit is installed, you can use the components in your app. This exam import { Devvit } from '@devvit/public-api'; import { Columns } from '@devvit/kit'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Columns static content', render: () => { diff --git a/versioned_docs/version-0.11/dimensions.md b/versioned_docs/version-0.11/dimensions.md index eac0da71..a8c349fa 100644 --- a/versioned_docs/version-0.11/dimensions.md +++ b/versioned_docs/version-0.11/dimensions.md @@ -28,6 +28,7 @@ Dimension information is specified in density-independent pixels. These pixel un This example shows a custom post that specifies dimensions. ```tsx +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Dimensions app', render: (context) => { @@ -53,6 +54,7 @@ export const MyHeader: Devvit.BlockComponent = (props, context) => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (_context) => { diff --git a/versioned_docs/version-0.11/interactive_posts.md b/versioned_docs/version-0.11/interactive_posts.md index 222683e0..62c36f6f 100644 --- a/versioned_docs/version-0.11/interactive_posts.md +++ b/versioned_docs/version-0.11/interactive_posts.md @@ -72,6 +72,10 @@ Here’s a comparison between the two: ### 1. Define your post type with `addCustomPostType` +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + The `.addCustomPostType(customPostType: CustomPostType)` function contains: - name of the post type @@ -86,6 +90,7 @@ The UI is wrapped in ``. If you don’t include them, `` will be ```ts // blocks +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', description: 'A big hello text.', @@ -104,6 +109,7 @@ Devvit.addCustomPostType({ }); // webviews +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post Type', description: 'A big hello text.', diff --git a/versioned_docs/version-0.11/payments/support_this_app.md b/versioned_docs/version-0.11/payments/support_this_app.md index 2cb29bc9..1455897f 100644 --- a/versioned_docs/version-0.11/payments/support_this_app.md +++ b/versioned_docs/version-0.11/payments/support_this_app.md @@ -58,6 +58,7 @@ import { usePayments, useProducts } from '@devvit/payments'; import { ProductButton } from '@devvit/payments/helpers/ProductButton'; import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ render: (context) => { const { products } = useProducts(context); diff --git a/versioned_docs/version-0.11/post_size.md b/versioned_docs/version-0.11/post_size.md index 9c1f9e1a..0098415f 100644 --- a/versioned_docs/version-0.11/post_size.md +++ b/versioned_docs/version-0.11/post_size.md @@ -8,6 +8,10 @@ There are two sets of dimensions that you’ll need to think about when creating Height is a property on `addCustomPostType`. You can set the height to `regular` or `tall`. By default, posts are regular height. +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + ### [Playground link](https://developers.reddit.com/play#pen/N4IgdghgtgpiBcIQBoQGcBOBjBICWUADgPYYAuABMACIwBudeZAvhQGYbFQUDkAAgBN6jMgHpCAVwBGAGzxYAtBEJ4eAHTAbaDJgDoIAgQGEJaMlwAKxMwBUAnoRgAKYBooVIseLwBy0GDzIbhQAFjB4AOYhZN48ZBAyMoHBGDBgQhjeAPpYxGBkMAAelAC8AHxUwe6pZBIYYBROVe4UADyyxFgA1mhlze6toh3dvc0AlMHMGswTmmBFJOQUQmwQEjKU2iIoIHQwGGh4eQgAjMxAA) ### Code sample @@ -15,6 +19,7 @@ Height is a property on `addCustomPostType`. You can set the height to `regular` ```tsx import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', height: 'tall', @@ -37,6 +42,7 @@ Elements in blocks have a height, width, and a corresponding minimum and maximum ```tsx import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (_context) => { @@ -64,6 +70,7 @@ You can also specify the minimum and maximum height and width in your interactiv ```tsx import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (_context) => { diff --git a/versioned_docs/version-0.11/webviews.md b/versioned_docs/version-0.11/webviews.md index cc7aa161..d6dc9095 100644 --- a/versioned_docs/version-0.11/webviews.md +++ b/versioned_docs/version-0.11/webviews.md @@ -378,6 +378,10 @@ Your user will interact with a web view, but payments APIs can only be invoked i ### Communicating between web view and payments +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + Both your web view and payments integrations need to be declared in the same `addCustomPostType` block. At that point, the lambdas given to each integration will be able to reference each other: ```typescript diff --git a/versioned_docs/version-0.11/working_with_useasync.md b/versioned_docs/version-0.11/working_with_useasync.md index 8fdc1c6f..04044432 100644 --- a/versioned_docs/version-0.11/working_with_useasync.md +++ b/versioned_docs/version-0.11/working_with_useasync.md @@ -154,6 +154,7 @@ const App = () => { }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Using useAsync with XKCD API', diff --git a/versioned_docs/version-0.11/working_with_useinterval.md b/versioned_docs/version-0.11/working_with_useinterval.md index 4910b1f8..d32c8207 100644 --- a/versioned_docs/version-0.11/working_with_useinterval.md +++ b/versioned_docs/version-0.11/working_with_useinterval.md @@ -59,6 +59,7 @@ function getCurrentTime() { return `${hours}:${minutes}:${seconds}`; } +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Clock', render: (context) => { diff --git a/versioned_docs/version-0.11/working_with_usestate.md b/versioned_docs/version-0.11/working_with_usestate.md index 794b8779..a5330f5c 100644 --- a/versioned_docs/version-0.11/working_with_usestate.md +++ b/versioned_docs/version-0.11/working_with_usestate.md @@ -144,6 +144,7 @@ const CountPage: Devvit.BlockComponent = ({ navigate, setCount, count }, }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Navigate between pages and count!', diff --git a/versioned_docs/version-0.12/api/public-api/classes/Devvit.md b/versioned_docs/version-0.12/api/public-api/classes/Devvit.md index b48c5309..a1257994 100644 --- a/versioned_docs/version-0.12/api/public-api/classes/Devvit.md +++ b/versioned_docs/version-0.12/api/public-api/classes/Devvit.md @@ -18,6 +18,10 @@ ## Methods +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + ### addCustomPostType() diff --git a/versioned_docs/version-0.12/blocks/button.mdx b/versioned_docs/version-0.12/blocks/button.mdx index d76e60c1..5f7533f5 100644 --- a/versioned_docs/version-0.12/blocks/button.mdx +++ b/versioned_docs/version-0.12/blocks/button.mdx @@ -163,6 +163,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/versioned_docs/version-0.12/blocks/image.mdx b/versioned_docs/version-0.12/blocks/image.mdx index bffda606..15da858a 100644 --- a/versioned_docs/version-0.12/blocks/image.mdx +++ b/versioned_docs/version-0.12/blocks/image.mdx @@ -183,6 +183,7 @@ A button that increments a counter ```tsx import { Devvit, useState } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Say Hello', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/blocks/app_image_assets.md b/versioned_docs/version-0.12/capabilities/blocks/app_image_assets.md index dfb5ea3f..8081eb47 100644 --- a/versioned_docs/version-0.12/capabilities/blocks/app_image_assets.md +++ b/versioned_docs/version-0.12/capabilities/blocks/app_image_assets.md @@ -65,6 +65,7 @@ const render: Devvit.CustomPostComponent = () => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My custom post', description: 'Test custom post for showing a custom asset!', diff --git a/versioned_docs/version-0.12/capabilities/blocks/dimensions.md b/versioned_docs/version-0.12/capabilities/blocks/dimensions.md index 15c69d99..a2404f21 100644 --- a/versioned_docs/version-0.12/capabilities/blocks/dimensions.md +++ b/versioned_docs/version-0.12/capabilities/blocks/dimensions.md @@ -15,6 +15,10 @@ You can use dimensions to: ## Getting dimensions +:::warning Deprecation notice +`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. +::: + Dimension information is specified in density-independent pixels. These pixel units are located on the context object. | Dimension | Description | @@ -28,6 +32,7 @@ Dimension information is specified in density-independent pixels. These pixel un This example shows a custom post that specifies dimensions. ```tsx +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Dimensions app', render: (context) => { @@ -53,6 +58,7 @@ export const MyHeader: Devvit.BlockComponent = (props, context) => { ); }; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (_context) => { diff --git a/versioned_docs/version-0.12/capabilities/blocks/working_with_useasync.md b/versioned_docs/version-0.12/capabilities/blocks/working_with_useasync.md index 8fdc1c6f..04044432 100644 --- a/versioned_docs/version-0.12/capabilities/blocks/working_with_useasync.md +++ b/versioned_docs/version-0.12/capabilities/blocks/working_with_useasync.md @@ -154,6 +154,7 @@ const App = () => { }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Using useAsync with XKCD API', diff --git a/versioned_docs/version-0.12/capabilities/blocks/working_with_useinterval.md b/versioned_docs/version-0.12/capabilities/blocks/working_with_useinterval.md index fec6e5db..18285113 100644 --- a/versioned_docs/version-0.12/capabilities/blocks/working_with_useinterval.md +++ b/versioned_docs/version-0.12/capabilities/blocks/working_with_useinterval.md @@ -59,6 +59,7 @@ function getCurrentTime() { return `${hours}:${minutes}:${seconds}`; } +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Clock', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/blocks/working_with_usestate.md b/versioned_docs/version-0.12/capabilities/blocks/working_with_usestate.md index b1b7db19..be09c064 100644 --- a/versioned_docs/version-0.12/capabilities/blocks/working_with_usestate.md +++ b/versioned_docs/version-0.12/capabilities/blocks/working_with_usestate.md @@ -144,6 +144,7 @@ const CountPage: Devvit.BlockComponent = ({ navigate, setCount, count }, }; //add your custom post +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AppName', description: 'Navigate between pages and count!', diff --git a/versioned_docs/version-0.12/capabilities/client/forms.mdx b/versioned_docs/version-0.12/capabilities/client/forms.mdx index 5dea0dd8..78e2ff36 100644 --- a/versioned_docs/version-0.12/capabilities/client/forms.mdx +++ b/versioned_docs/version-0.12/capabilities/client/forms.mdx @@ -77,6 +77,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi import { Devvit, useState, useForm } from '@devvit/public-api'; // Interactive post with form + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'FormExample', render: (context) => { @@ -1048,6 +1049,7 @@ Below is a collection of common use cases and patterns. redditAPI: true, }); + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Multi-step Form', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/client/navigation.mdx b/versioned_docs/version-0.12/capabilities/client/navigation.mdx index 3f2b3bd9..859d097e 100644 --- a/versioned_docs/version-0.12/capabilities/client/navigation.mdx +++ b/versioned_docs/version-0.12/capabilities/client/navigation.mdx @@ -93,6 +93,7 @@ When linking to Reddit content, the navigation function requires the app account }); // Interactive post with navigation + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Navigation Post', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/client/overview.mdx b/versioned_docs/version-0.12/capabilities/client/overview.mdx index 837a6f57..508156a6 100644 --- a/versioned_docs/version-0.12/capabilities/client/overview.mdx +++ b/versioned_docs/version-0.12/capabilities/client/overview.mdx @@ -46,6 +46,7 @@ Client-side effects enable your Devvit app to provide interactive feedback and n import { Devvit } from '@devvit/public-api'; // In a custom post component + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Interactive Post', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/client/toasts.mdx b/versioned_docs/version-0.12/capabilities/client/toasts.mdx index 0bec1edb..580543f1 100644 --- a/versioned_docs/version-0.12/capabilities/client/toasts.mdx +++ b/versioned_docs/version-0.12/capabilities/client/toasts.mdx @@ -93,6 +93,7 @@ Toasts will not work from scheduled jobs or triggers. }); // Example in blocks + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'My Custom Post', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/server/cache-helper.mdx b/versioned_docs/version-0.12/capabilities/server/cache-helper.mdx index 3e380079..894e2969 100644 --- a/versioned_docs/version-0.12/capabilities/server/cache-helper.mdx +++ b/versioned_docs/version-0.12/capabilities/server/cache-helper.mdx @@ -238,6 +238,7 @@ Here’s a way to set up in-app caching instead of using scheduler or interval t // other capabilities }); + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'Name', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/server/post-data.mdx b/versioned_docs/version-0.12/capabilities/server/post-data.mdx index ac2f09f4..3e8a22ed 100644 --- a/versioned_docs/version-0.12/capabilities/server/post-data.mdx +++ b/versioned_docs/version-0.12/capabilities/server/post-data.mdx @@ -310,6 +310,7 @@ To update post data after creation, fetch the post and use the `setPostData()` m ```ts title="main.tsx" import { Devvit, useForm } from '@devvit/public-api'; + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'InteractivePost', render: (context) => { @@ -378,6 +379,7 @@ Post data is available through `context.postData` in both client and server cont ```tsx title="main.tsx" import { Devvit } from '@devvit/public-api'; + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'MyCustomPost', render: (context) => { diff --git a/versioned_docs/version-0.12/capabilities/server/settings-and-secrets.mdx b/versioned_docs/version-0.12/capabilities/server/settings-and-secrets.mdx index 2c7804fe..5b3d6909 100644 --- a/versioned_docs/version-0.12/capabilities/server/settings-and-secrets.mdx +++ b/versioned_docs/version-0.12/capabilities/server/settings-and-secrets.mdx @@ -293,6 +293,7 @@ Settings can be retrieved from within your app. }); // Access in custom post type + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'ConfigurablePost', render: (context) => { @@ -620,6 +621,7 @@ Here's a complete example showing both secrets and subreddit settings in action: return data.choices[0]?.message?.content || 'No response'; } + // addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'AI Assistant', render: (context) => { diff --git a/versioned_docs/version-0.12/earn-money/payments/support_this_app.md b/versioned_docs/version-0.12/earn-money/payments/support_this_app.md index 242ac04a..e17dc830 100644 --- a/versioned_docs/version-0.12/earn-money/payments/support_this_app.md +++ b/versioned_docs/version-0.12/earn-money/payments/support_this_app.md @@ -58,6 +58,7 @@ import { usePayments, useProducts } from '@devvit/payments'; import { ProductButton } from '@devvit/payments/helpers/ProductButton'; import { Devvit } from '@devvit/public-api'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ render: (context) => { const { products } = useProducts(context); diff --git a/versioned_docs/version-0.12/guides/tools/devvit_cli.mdx b/versioned_docs/version-0.12/guides/tools/devvit_cli.mdx index 91596411..436ebd53 100644 --- a/versioned_docs/version-0.12/guides/tools/devvit_cli.mdx +++ b/versioned_docs/version-0.12/guides/tools/devvit_cli.mdx @@ -38,6 +38,7 @@ $ npx devvit create icons "src/my-icons.ts" import { Devvit } from '@devvit/public-api'; import Icons from './my-icons.ts'; +// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. Devvit.addCustomPostType({ name: 'my-custom-post', render: (_context) => {