DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Bret
Bret

Posted on

How do you connect c++ in a react project?

How do you connect a C++ file to React?

Top comments (8)

Collapse
 
hamiecod profile image
Hargunbeer Singh

Use C++ addons for node.js

P.S: You would get a better response in Stack Exchange or StackOverFlow :)

Collapse
 
yobretyo profile image
Bret

Thank you, I actually can’t stand Stack Overflow.... you mess up spelling, and they attack or even just a topic.... they get mad if you ask a NEW variation of a Question, that hasn’t been asked... and they get mad

Collapse
 
hamiecod profile image
Hargunbeer Singh

That's a shocking reality of StackOverFlow, which needs to change as people will only be comfortable asking questions if the community is chill(informal).

Collapse
 
tiagomelojuca profile image
Tiago Melo JucΓ‘

You have some options here:
1) Use the NodeJS nAPI to build a native module
2) Use a C++ application as backend for your React SPA
3) Use child_process (or something like ShellJS) to handle I/O of your C++ binary
4) Take a look at Web Assembly

Collapse
 
ats1999 profile image
Rahul kumar

Make a browser which can also parse c++.

Good luck

Collapse
 
zakiazfar profile image
Mohd Ahmad

through wasm

Collapse
 
shajidhasan profile image
Shajid Hasan

Run C++ in your backend/server. Communicate with it from your frontend with http requests.

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git