-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
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
errors with demo #90
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I copy the demo code , but it doesn't run well in React.
react version is the latest.
node version is 17.0.2.
const Jp = () => {
let [id,]=React.useState('')
// Instantiate
React.useEffect(() => {
demo()
}, [id]);
async function demo (params) {
const kuroshiro = new Kuroshiro();
// Initialize
// Here uses async/await, you could also use Promise
await kuroshiro.init(new KuromojiAnalyzer());
// Convert what you want
const result = await kuroshiro.convert("感じ取れたら手を繋ごう、重なるのは人生のライン and レミリア最高!", { to: "hiragana" });
console.log(result)
}
return
};
export default Jp;
![捕获](https://user-images.githubusercontent.com/33920719/148052248-9268c67d-0a7a-444e-b7ba-f9d7f7335c07.PNG)
The text was updated successfully, but these errors were encountered: