I am repurposing an array of react components and I want to change the inline styles that they get generated with. How do I, for instance, console.log the inline styles of a react component?
EDIT: code snippet below:
const pieces = this.props.pieces.map((decl, i) => {
const isMoving = draggingPiece && i === draggingPiece.index;
const { x, y, piece } = decode.fromPieceDecl(decl);
const Piece = pieceComponents[piece];
return (
<Draggable
bounds="parent"
position={{ x: 0, y: 0 }}
onStart={this.handleDragStart}
onDrag={this.handleDrag}
onStop={this.handleDragStop}
key={`${piece}-${x}-${y}`}
>
<Piece isMoving={isMoving} x={x} y={y} />
</Draggable>
);
});
console.log(pieces[8].style) // error