My react class is accepting an external object(COM window) as props, which is then passed to child elements. Instead of using prop drilling I am using useContext() hook to deliver prop where it is required.
<sampleContext.Provider value={nonJavascriptObj}>
<RootClass
....../>
</sampleContext.Provider>
So my question is can I pass a non javascript object mentioned above to provider. And expect to get the same object back with useContext()
I don't know much about the non javascript object, just that it is a C/C++ object and when I try to print it in console it looks something like this:
[Object] { }
It looks empty, but it isn't. This object is used to call a windows API.
No responses yet.