Writing a codemod to migrate ReactDOM.Style.make calls to style records

Hello

rescript-react 0.13.1 deprecates usage of ReactDOM.Style.make. I’ve got ~1400 calls to that function in my codebase, so I’m trying to find ways to automate the migration to style records a bit :slight_smile:

Is there any codemod documentation about ways to parse each file/module and make some rewrites?

2 Likes

Hello @remitbri, it’s definitely something that is lacking right now. We’re cleaning up a lot of APIs for ReScript v12 and having tools to automate the migration would be very nice but I guess no one had the time to come up with such tools for now.

You could maybe try something with a tool like comby, if you manage to get decent results, please post your script here, we could try to include it in some official migration tool. If you’re interested in writing such tools, your help would be very much appreciated, I can assure you!