3 ms·
I really like Vue, and I love single file components. React folks: Is there no way to do this with React? I may need to use React soon, and if it can't do this
by CharlesW 10y ago
I really like Vue, and I love single file components.
React folks: Is there no way to do this with React? I may need to use React soon, and if it can't do this I'm going to be pretty sad.
- acemarke 10y agoYou can write components however you want. For components and styles, there's numerous approaches, and it's up to you which one you use. You can write your CSS totally separately, you can import CSS into a JS file and have it auto-generate unique class names, you can define styles completely inline in a component, and so on. Can you maybe clarify what you think you can't do with React?