Similarities of laravel command and vue/react component props behavior

As a developer it is key to learn a skill that can be easily transfered to another domain with losing meaning.I think am starting to see how knowledge can truly shared across domains, here’s an example.

In react when to pass props on a component we us…


This content originally appeared on DEV Community and was authored by Vuyani Daweti

As a developer it is key to learn a skill that can be easily transfered to another domain with losing meaning.I think am starting to see how knowledge can truly shared across domains, here's an example.

In react when to pass props on a component we use command=value type of syntax as function arguement,we then take these arguments and process them. If they are boolean types we can just pass the name without value.

REACT/VUE

<Component show/>

SAME AS 
<Component show=true/>

LARAVEL Commands

In laravel command do it the samoe way

php artisan commandName {show}

SAME AS 
php artisan commandName {show=true}

Both these statement pass value=true by just being stated.The behavior is the same,though they are not declared on a similar manner.

This a good example of transfer behavior across different domains in programming.


This content originally appeared on DEV Community and was authored by Vuyani Daweti


Print Share Comment Cite Upload Translate Updates
APA

Vuyani Daweti | Sciencx (2024-08-29T20:12:38+00:00) Similarities of laravel command and vue/react component props behavior. Retrieved from https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/

MLA
" » Similarities of laravel command and vue/react component props behavior." Vuyani Daweti | Sciencx - Thursday August 29, 2024, https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/
HARVARD
Vuyani Daweti | Sciencx Thursday August 29, 2024 » Similarities of laravel command and vue/react component props behavior., viewed ,<https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/>
VANCOUVER
Vuyani Daweti | Sciencx - » Similarities of laravel command and vue/react component props behavior. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/
CHICAGO
" » Similarities of laravel command and vue/react component props behavior." Vuyani Daweti | Sciencx - Accessed . https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/
IEEE
" » Similarities of laravel command and vue/react component props behavior." Vuyani Daweti | Sciencx [Online]. Available: https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/. [Accessed: ]
rf:citation
» Similarities of laravel command and vue/react component props behavior | Vuyani Daweti | Sciencx | https://www.scien.cx/2024/08/29/similarities-of-laravel-command-and-vue-react-component-props-behavior/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.