rescript-vscode
rescript-vscode copied to clipboard
Make rename work for component names
trafficstars
Renaming the module name used in a component does not automatically propagate to JSX, because JSX indirectly refers to the make/makeProps functions.
Came here to report this.
Briefly on how this could be done.
The rename command should recognise when a module C is a component, and in that case look in the typed Ast for references to C.make. When a reference is found, use the location to find in the parse tree whether C.make is part of a jsx expression. If it is, change the name of the component.