What is props in ReactJS, Is it the same $scope of angular? -
what props in reactjs? same $scope of angularjs? can't seem understand props in react, since im new it. thank in advance.
they not equivalent:
- react
props
input values passed components describe output. - angular
$scope
object refers contextual execution (the scope) expression.
[check out answer 'what $scope in angular?']
angular $scope
object defines context of variables/properties/functions of controller object.
react props
actual arbitrary values consumed component function/class.
"conceptually, components javascript functions. accept arbitrary inputs (called "props") , return react elements describing should appear on screen."
"scope object refers application model. execution context expressions."
Comments
Post a Comment