Skip to content
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

Addon usage in React #7

Open
Skagoo opened this issue Jun 28, 2019 · 2 comments
Open

Addon usage in React #7

Skagoo opened this issue Jun 28, 2019 · 2 comments

Comments

@Skagoo
Copy link

Skagoo commented Jun 28, 2019

Hi,
first of all I highly appreciate that you made it possible to use the TS3Sdk in JS.

I've used your plugin successfully in a project of mine, made in electron. I've now moved to React and wanted do do a huge rework on my project, using React instead.

However I can't seem to figure out on how to get the addon working. I tried both with npm and by cloning the repo, building it (with npm install) and then include it in my project's src. Referencing the module with var ts3client = require('../api.js'); throws no errors but ts3client.initClientLib(ts3client.LogTypes.CONSOLE, undefined, ts3client.getResourcePath()); states that LogTypes is undefined.

Looking forward to your response.

@befovy
Copy link

befovy commented Oct 27, 2019

Hi, I find this issues from https://stackoverflow.com/questions/57061352/how-to-use-a-native-node-js-addon-in-react.
So, have you got the sulution? Thanks.

@befovy
Copy link

befovy commented Oct 29, 2019

I have found a solution to use node C++ addon in React & Electron.
You can see it from this commit befovy/node-addon-starter@b841f0d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants