typescriptjsxdenofreshjs

What is the Replacement for props.data?


I am currently building a personal website using Deno's Fresh.js. I need to pass the contents of a text file into a dynamic route page, and I am following the documentation on the Fresh website, which instructs to use props.data. However, in my IDE (Visual Studio Code), it says that the data attribute for props is deprecated, and that values should be passed to state. Using data.props currently works without issue, but I would like to know what the preferred method for passing data is if Fresh's props.data is deprecated, and I cannot find any information on the subject.


Solution

  • According to the response to the issue posted on the Github, the feature in question was deprecated too early, and has been undeprecated in 1.6.1.