chanind / hanzi-writer

Chinese character stroke order animations and practice quizzes
https://hanziwriter.org
MIT License
3.48k stars 542 forks source link

How to import to React project? #209

Closed niustem closed 3 years ago

niustem commented 3 years ago

I use create-react-app. in package.json, I installed these two dependency, but import failed... "hanzi-writer": "^2.3.0", "hanzi-writer-data": "^2.0.1", 无标题

chanind commented 3 years ago

This is just typescript saying that there's no type definitions file for Hanzi Writer. You can just disable that warning and it should be fine. Depending on how your module imports are set up, you might need to do import HanziWriter from 'hanzi-writer', or import * as HanziWriter from 'hanzi-writer'

niustem commented 3 years ago

you are right, Thank you so much. ^_^ It is another problem, I fixed after I get help from you. 无标题