React and React Router v7 Snippet and Auto Importer

All plugins

By Sarthak shende

Version 1.5.3

React Snippets 🚀 I built this plugin to solve the common headaches of React development on Acode, specifically for mobile environments like Termux. It handles the repetitive tasks—managing imports, closing tags, and fixing indentation—so that coding feels smoother on a small screen. --- 🛠 Features Auto-Import on Save : Automatically manages your imports when you save a file based on your setting: React : Core hooks (useState, useEffect, etc.) and components (Suspense, Fragment). React Router v7 : Full support for latest hooks (useLoaderData, useNavigate) and components (Link, Outlet). Custom Components : Scans your local project directory to auto-import your own components based on your settings. Smart Path (Relative) : Calculates the exact relative path from your current file to the component (e.g., import Header from '../../components/Header.jsx' ). This is the best for standard React structures. Absolute Path : Uses a fixed path from your defined import path (e.g., import Header from './src/components/Header.jsx' ). Selected Text Import : Highlight any text in the editor and trigger the import command. This is incredibly useful for quickly importing: Props & Types : Standardizing interfaces across files. Context API & Providers : Injecting state management components. Router Components : Adding Link , Route , or custom navigation wrappers instantly. Custom Snippet Engine : Link a physical folder to use your own .snippets files. The plugin automatically generates templates for you to customize. Tag Auto-Closing : Typing automatically adds the matching closing tag. It intelligently ignores "void tags" like , , and . Dual Editor Support : Fully optimized for both Ace Editor and CodeMirror 6 . --- 🚀 How to Use (Setup Smart Import) Follow these steps to enable the full power of the Smart Auto-Import engine: 1. Initialize the Project : After installing the plugin, press Ctrl + Shift + G or search for "React Snippet: Quick Select React Project" in the command palette. 2. Select Your Workspace : The plugin will scan your Acode sidebar and provide a list of detected React projects. Select the one you are currently working on. Note : If no projects are detected automatically, a file browser will open. Manually navigate to and select your current project's root folder. 3. Indexing Components : Once the project is selected, the plugin automatically scans your…