Node JS and React problems #1098
Replies: 2 comments 5 replies
-
I am not a deep expert in React but I think the problem might be the fact you are using It is less a alphaTab problem than rather using React correctly. We are using Docusaurus for the alphaTab website and there we also use React: https://github.com/CoderLine/alphaTabWebsite/blob/develop/src/components/AlphaTab/index.tsx#L13 We might not be doing all the things like a proper full React app would be doing so it is not a good reference how to use alphaTab fully in React. It is more a proof that generally things are working fine. |
Beta Was this translation helpful? Give feedback.
-
No problem. Thanks for replying again. I actually found a solution recently. I noticed that creating AlphaTabApi the way I described it fontDirectory and scriptFile were trying to get the files from localhost. I had to change it manually before API initialization. |
Beta Was this translation helpful? Give feedback.
-
I tried using AlphaTab with React first and after trying code from this example: https://codesandbox.io/s/kpy7o. I've given up on it. Code from the example worked if I cloned it and ran it locally, but if I tried the same code with my existing project which runs newer react and AlphaTab version I got a crash in Chrome (no errors shown, just "Aw Snap" crash on Chrome).
After that I tried using AlphaTab in Node JS. I was able to load the scores, displaying score title, artist, tracks...but when using renderer functions like (partialLayoutFinished, partialRenderFinished...) copied from docs, renderResult was always null. I don't know if it's a bug or am I doing something completely wrong.
Beta Was this translation helpful? Give feedback.
All reactions