I need to consume and listen changes of a React context inside a column template.
See the example below:
In this example, I have two column template components:
- ColTemplateFixed: Works fine using as a template or not. It doesn't use "useContext"
- ColTemplateDynamic: Works fine outside the grid but it doesn't work when used as column template. It use "useContext".
I put two "console.log" in ColTemplateDynamic to check.
The grid start the render but crashes silently when try to call "useContext".
I think that the problem is in file: "@syncfusion/ej2-react-base/src/template.js" in this instruction: "ReactDOM.render(actTemplate(actData), ele);"
When the grid uses "ReactDOM.render" to render the template, I lose the ability to access the context.
Redux not works because it uses context, too.
There's another way to make this work?