We have spent much time on this problem, so we can share some experience we have learned during product development.
First at all, the react-sketchapp is "react to sketch" direction, not sketch to react.
For sketch to react problem, the hardest things we found are
- the difference of tree structure between sketch & react code
Designer focus on the visual, and won't care about the item structure, but engineers DO care about the structure of the DOM because it's designed for dynamic layout and resizable
So our way is to use some smart algorithm (or AI in the future) with little human intervention. Sometimes it's really hard to decide because there might be different right answers in terms of layout
- the description or settings for the resizing layout
Sketch (the design tool) won't have any concept and hint about the layout (especially the relationship among children). So sometimes engineers are required to discuss with designer the exact behaviors while the component is resizing.
So it's required a way to convert the structure into some kinds of settings of layout. After trying, our suggestions would be CSS flex and grid. Because flex and grid provide great flexibility for positioning and be widely used and recognized by frontend engineers, also with high browser compatibility.
These two issues above are hard to be automated 100%, but after several iterations, we think it can be done 70% automated with some algorithms and a little human intervention. The generated code would be useful with right layout structure. After that, it could be improved to better code by applying some code optimization (shared style, better naming, simplified css/code, ...etc) which is easier to resolve.