To give Cursor consistent React guidance, add focused .mdc Project Rules under .cursor/rules, then scope each rule to the files or work it covers. Cursor recommends Project Rules for new setups; the root-level .cursorrules file is legacy. Rules add reusable instructions to the model’s context, but they are guidance—not a guarantee that every generated change will follow your style.
Set up a React Project Rule
Project Rules are version-controlled instructions for a codebase, so they can be shared with teammates. In your repository, create .cursor/rules and add a rule file with the .mdc extension. MDC files combine frontmatter metadata with the rule text. Cursor documents the frontmatter fields description, globs, and alwaysApply. See the Cursor Rules guide and its legacy migration guidance for the current product details.
.cursor/
rules/
react-components.mdc
Here is an example you can adapt. It is an editorial example, not a Cursor-mandated React standard; adjust the pattern and conventions to fit your repository.
---
description: React component conventions
globs: "src/**/*.{tsx,jsx}"
alwaysApply: false
---
- Use the component and prop patterns already established in nearby files.
- Keep components focused; move reusable non-UI logic into the project's existing hooks or utilities.
- Use semantic HTML and preserve keyboard accessibility.
- Follow the repository's existing TypeScript, styling, and test conventions.
- Before adding a dependency or changing architecture, explain why it is needed.
- When editing a component, inspect a nearby example and follow its naming and export style.
The glob shown targets JSX and TSX files beneath src. If your project uses different folders, extensions, or naming conventions, change it accordingly. Rules work better when they describe observable choices—such as which export pattern to follow—than when they ask for “clean” or “good” code without defining what those words mean.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Choose when each rule applies
Cursor documents four ways Project Rules can enter an interaction: always applied, attached to files matching a pattern, available for the agent to request, or included when explicitly invoked. Choose based on where the guidance belongs, rather than making every React instruction global.
| Rule approach | When it fits | Trade-off |
|---|---|---|
| Always applied | Core conventions that matter across the repository. | Instructions are broad in scope, including work outside React files. |
| File-pattern attached | Guidance specific to components, tests, styles, or another identifiable set of files. | The pattern must match the files being edited. |
| Agent-requested | Useful guidance that the agent can select when relevant. | Cursor’s FAQ says to define a description for intelligently applied rules. |
| Manually invoked | Instructions needed only when you deliberately call for them. | You must invoke the rule for it to apply. |
Use a small always-applied rule for genuinely project-wide expectations, and separate React-specific guidance from unrelated repository work. Component conventions, tests, styling, accessibility, and data fetching can each have their own rule when they are distinct concerns. Cursor recommends focused, actionable rules, concrete examples or references, and composable files; it gives under 500 lines as a target for a rule, not as a demonstrated performance threshold.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Project Rules, User Rules, and AGENTS.md
Project Rules are for repository-level instructions that can be checked into the codebase. User Rules are preferences applied across projects in a user’s Cursor environment, so they are not a substitute for sharing team conventions in the repository. Cursor also describes AGENTS.md as a plain-Markdown alternative for agent instructions. These formats and scopes are not interchangeable: choose based on whether the guidance belongs to one project, your personal setup, or a plain-Markdown agent workflow.
Cursor’s reviewed documentation describes rules as applying to Agent and some inline-edit surfaces, but its pages differ on precise product-feature coverage. Check the active-rules display in your installed Cursor version and confirm the behavior on the editing surface you use.
Recommended Free Tools
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Write instructions Cursor can act on
Start with the code that already exists in the repository. A rule should tell Cursor what to preserve or do, where that instruction applies, and—when helpful—where to find an example. For instance, “follow the naming and export style in a nearby component” is more actionable than “write idiomatic React.” Cursor’s documentation gives examples using MDC frontmatter and recommends concrete examples or references to files.
- Describe conventions as observable actions: use the project’s existing component and prop patterns, or put reusable non-UI logic in its established hooks or utilities.
- Keep a rule focused on one meaningful concern. Split test conventions from component conventions if that makes each instruction clearer.
- Refer to existing files that demonstrate the desired pattern when a short instruction alone is ambiguous.
- Use globs that reflect the repository’s actual paths and extensions; a plausible-looking pattern that matches nothing will not attach the rule to the intended files.
- Keep instructions concise and specific enough to review and revise when the codebase changes.
Do not expect a rule to replace enforceable checks. Pair written guidance with the project’s formatter, linter, type checker, and tests for constraints those tools can verify. Rules provide persistent prompt-level guidance; they are not deterministic lint rules.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Migrate from the legacy .cursorrules file
Cursor labels .cursorrules as legacy and recommends Project Rules for new setups. If the old root-level file contains instructions you still need, transfer them into a project rule and select a rule type that preserves the intended behavior.
- Create a new
.mdcfile under.cursor/rules. - Copy and review the old instructions. Set the new rule to Always Apply if the old instructions were intended to be always on; otherwise choose a narrower scope that reflects their purpose.
- Open a representative React file and verify that the new rule appears as active and applies during an edit.
- After you have confirmed the replacement works as intended, remove the legacy root-level file.
The verification step is a practical safeguard for your repository, not a result Cursor publishes for every project. The documented migration guidance is available on the Cursor legacy rules page.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Troubleshoot a rule that seems ignored
Work through the checks that correspond to the rule’s activation method. Cursor’s Rules FAQ specifically calls out missing descriptions for Agent Requested rules and patterns that do not match referenced files.
- Confirm the file is in the right place: it should be a recognized
.mdcrule under.cursor/rules. - Check the frontmatter: make sure the metadata is valid and the rule’s activation settings match what you intend.
- Check the pattern: for a file-attached rule, compare its glob with the exact path and extension of the file being edited.
- Check activation: if the rule is agent-requested, provide a description; if it is manually invoked, request it explicitly.
- Check active rules: inspect Cursor’s active-rules display in your installed version to see what is included for the interaction.
- Refine the specific failure: add a concrete example or reference to a nearby file rather than piling on broad slogans.
Product behavior can change, and the reviewed documentation is undated; the pages were accessed on October 5, 2026. Treat the active-rules display and a representative edit in your own installed version as the practical check for your setup.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

