I am using create-react-app and the lib d3-delaunay (https://github.com/d3/d3-delaunay) to generate a voronoi diagram. It is generated in a web worker managed with https://github.com/developit/workerize-loader. When passed to the main thread the generated object loses its attributes.

I cannot longer use the render fucntion I need to use so I tried to play with Object.assign and Object.create but I didn't succeed. What should I do?
When you pass an object between threads, the structured clone algorithm is used to make a copy of the object, which doesn't include functions. From that MDN link:
Things that don't work with structured clone
Functionobjects cannot be duplicated by the structured clone algorithm; attempting to throws aDataCloneErrorexception.- Cloning DOM nodes likewise throws a
DataCloneErrorexception.- Certain object properties are not preserved:
- The
lastIndexproperty ofRegExpobjects is not preserved.- Property descriptors, setters, getters, and similar metadata-like features are not duplicated. For example, if an object is marked readonly with a property descriptor, it will be read/write in the duplicate, since that's the default.
- The prototype chain is not walked or duplicated.