Skip to content

Json data from a HTML Data Attribute not being picked up in a React TSX file #172

Closed Answered by azam-bvm
azam-bvm asked this question in Q&A
Discussion options

You must be logged in to vote

The v2.0 release of Preline fixes this issue with added support for Typescript, the documentation below provides the necessary steps to:
https://preline.co/docs/frameworks-react.html

If typescript does not recognize HSStaticMethods.autoInit() then use // @ts-ignore.

If import("preline/preline") throws an error, create a folder named 'types' with a file 'preline.d.ts' in your root project folder. The file will contain declare module 'preline/preline';

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by azam-bvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant