To declare column-specific settings, pass the settings as HotColumn props, either separately or wrapped as a settings prop, exactly as you would with HotTable.
When you use object data binding for <HotColumn/>, you need to provide precise information about the data structure for columns. To do so, refer to your object-based data property in HotColumn's data prop, for example, <HotColumn data='id' />:
import{ HotTable, HotColumn }from'@handsontable/react';import{ registerAllModules }from'handsontable/registry';import'handsontable/dist/handsontable.full.min.css';// register Handsontable's modulesregisterAllModules();// a renderer componentconstScoreRenderer=(props)=>{const{ value }= props;const color = value >60?'#2ECC40':'#FF4136';return(<spanstyle={{ color }}>{value}</span>);};// a renderer componentconstPromotionRenderer=(props)=>{const{ value }= props;if(value){return(<span>✔</span>);}return(<span>✗</span>);};// you can set `data` to an array of objectsconst data =[{id:1,name:'Alex',score:10,isPromoted:false},{id:2,name:'Adam',score:55,isPromoted:false},{id:3,name:'Kate',score:61,isPromoted:true},{id:4,name:'Max',score:98,isPromoted:true},{id:5,name:'Lucy',score:59,isPromoted:false}];exportconstExampleComponent=()=>{return(<HotTabledata={data}licenseKey="non-commercial-and-evaluation"autoRowSize={false}autoColumnSize={false}>{/* use the `data` prop to reference the column data */}<HotColumndata="id"/><HotColumndata="name"/><HotColumndata="score">{/* add the `hot-renderer` attribute to mark the component as a Handsontable renderer */}<ScoreRendererhot-renderer/></HotColumn><HotColumndata="isPromoted">{/* add the `hot-renderer` attribute to mark the component as a Handsontable renderer */}<PromotionRendererhot-renderer/></HotColumn></HotTable>);};