<#C7L3JB43G|compiler> <#CJLTWPH7S|compose> Hi All,...
# compose
s
#compiler #compose Hi All, I want to modify Jetpack compose functions in my app source code. I am not sure where to start writing compiler plugin for that. What I want to achieve is, in @composable functions if any new object is created and Content() function is called immediately. I want to replace new object creation with remember block and call Content() method. From this
Copy code
@Composable
fun AllComposableFunctions() {
    TestWidget().Content()
}
To
Copy code
@Composable
fun AllComposableFunctions() {
    remember { TestWidget() }.Content()
}
Basically TestWidget is a flutter style stateful widget. Since compose functions will be called multiple times, first function new object each time function runs. Wrapping object creation with remember solves the problem. but I want to do it via compiler plugin, so that code looks elegant. Please advice where should i start and right materials to follow