React Router/7/Form Methods Post Get To Uppercase

1.0.1Last update Dec 17, 2024
by@manishjha-04

This transformation updates formMethod checks to use uppercase HTTP methods.

Before

useNavigation().formMethod === 'post';
useFetcher().formMethod === 'get';

After

useNavigation().formMethod === 'POST';
useFetcher().formMethod === 'GET';

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now