0 comments (0 comments)0 reactions (0 reactions)0 assignees (0 assignees)JavaScript420 stars (420 stars)27 forks (27 forks)user submission
enhancementhelp wanted
Description
Currently you can only use it in stateful components since the current implementation need to access $options.
Contributor guide
- Tech stack
- vuejavascript
- Domain
- frontend
- Issue type
- feature
- DifficultyEstimated implementation difficulty for a new contributor, from 1 for very small changes to 5 for expert-level work.
- 3
- Estimated timeA rough time range for an experienced contributor to investigate, implement, test, and prepare a pull request.
- half day
- Activity statusHow available the issue appears right now: fresh, active, stale, blocked, or waiting on maintainer input.
- stale
- ClarityHow clearly the issue explains the expected change, acceptance criteria, and next step.
- clear
- Prerequisites
- Understanding of Vue functional componentsFamiliarity with styled vue source code
- Newbie friendlinessA 1-100 score estimating how approachable this issue is for first-time contributors.
- 40
- Research direction
- The issue requests support for Vue functional components. Currently, the implementation uses $options which is only available in stateful components. To add support, you need to modify the library to detect functional components and handle them differently. Look at Vue's documentation on functional components, especially the render function context. Then examine the source files in the styled vue repo, likely in the main index.js or src folder, to understand how styles are applied. Check if there are any existing PRs or discussions for inspiration. Consider using a different mechanism, like injecting a prop or using the component's context, to make styles work without $options.