A component in the Unified Modeling Language "represents a modular part of a system, that encapsulates its content and whose manifestation is replaceable within its environment. A component defines its behavior in terms of provided and required interfaces". The best example of component can be found in ActionScript- Flash,Flex sdks. There you have UI components like buttons, labels, DataGrids, charts those are reusable, distributable etc.
Questions tagged [components]
11658 questions
32
votes
3 answers
C# - What is a component and how is it typically used?
What is a component class and where would I typically use one?
When I add a new item to my project in VS.NET 2008 one of the options is to add a component.
I am not even sure I understand what a component is - but I would sure like to find out a bit…

Brad
- 20,302
- 36
- 84
- 102
32
votes
2 answers
React functions inside render()
Is there a preference on where you put functions inside a react component? I am still learning React so just trying to figure out the best practices.
class Content extends React.Component {
// What is the difference between putting functions here…

Whymess
- 697
- 3
- 8
- 20
32
votes
1 answer
React, get bound parent dom element name within component
Within my component, how can I access the name of the parent component it is nested inside?
So if my render is thus:
ReactDOM.render(
,
document.getElementById('radials-1')
);
How can I retrieve the id…

Union find
- 7,759
- 13
- 60
- 111
31
votes
3 answers
Cannot use v-for on stateful component root element because it renders multiple elements?
app.js
var Users = {
template: `
{{ list.idx }}
{{ list.id }}
`,
data: function () {
return {
UsersData //get data from…

ofleaf
- 615
- 1
- 6
- 18
31
votes
6 answers
Simplest way to create busy animation in WPF
I mentioned that there is no standard busy control in WPF. So what's the easiest way to display animated busy circle (not progress bar) such as your browser displays when loading a page ?
Please if you suggest downloading control from internet make…

Rasto
- 17,204
- 47
- 154
- 245
30
votes
1 answer
Removing the CENTER element from a JPanel using BorderLayout
Is there any way of removing the Component added to the CENTER of a JPanel with a BorderLayout, without having to reference the Component itself?

Evan Fosmark
- 98,895
- 36
- 105
- 117
30
votes
4 answers
Difference between components, modules, extensions and plugins in Joomla
What is the difference between Joomla components, modules, extensions and plugins?

Bryan
- 17,201
- 24
- 97
- 123
29
votes
2 answers
How do I call setState from another Component in ReactJs
I have two react components and I'd like to call setState to set a state in the one Component but called in the other one.
How do I do that?

Dennis Schweizer
- 393
- 1
- 3
- 6
29
votes
3 answers
how to use parent module component in child module component in angular2
I have header that should be used in both child and parent module.that was imported and used in parent module but when try to import and using in child component it showing error.I mean how to use common header for both parent and child…

j dileep
- 505
- 1
- 4
- 11
29
votes
8 answers
How to "communicate" between components in Angular?
How to exchange data between components in Angular?
For instance, communicating between parent and child components or between siblings.

吴桂林
- 311
- 1
- 3
- 3
28
votes
4 answers
How do I export more than one class component with React JS?
I'm new to React and would like to keep all my components in one file. How do I export more than one component and keep them in the same file?
import React, { Component } from "react";
class MyText extends Component {
render() {
return…

Tony Carbetta
- 283
- 1
- 4
- 7
28
votes
3 answers
Pass data from parent to child component in vue.js
I am trying to pass data from a parent to a child component. However, the data I am trying to pass keeps printing out as blank in the child component. My code:
In Profile.js (Parent component)
…

Trung Tran
- 13,141
- 42
- 113
- 200
28
votes
1 answer
How to use Stuart Sierra's component library in Clojure
I'm struggling to get my head around how to use Stuart Sierra's component library within a Clojure app. From watching his Youtube video, I think I've got an OK grasp of the problems that led to him creating the library; however I'm struggling to…

monch1962
- 5,151
- 5
- 31
- 38
27
votes
3 answers
react / functional component / props changed / getDerivedStateFromProps
Lets say I'm doing a simple CRUD app in react. My functional component is basically just the form.
In the CREATE case I pass in an empty object via props
In the UPDATE case I pass in an object with the values via props (I got the data in the parent…

Thread Pitt
- 716
- 1
- 6
- 20
27
votes
2 answers
Component without template
I have a bit of code that makes an api call to a server and returns some JSON.
It did exist as a method in my component but as it is getting a bit long I want to extract it to it's own file
In vuejs what is the best practice here.
should it be a…

LeBlaireau
- 17,133
- 33
- 112
- 192