How to install react js in laravel
How to install react js in laravel

How to install React Js in Laravel in Hindi

What is React JS?

How to install React Js in Laravel से पहले हम React Js के बारे में जान लेते है। React Js एक open-source front-end Javascript library है जिसका उपयोग UI component या user interface बनाने के लिए किया जाता है। React js facebook द्वारा बनाया गया है जिसे facebook और individual developers की community द्वारा maintain किया जाता है। React js का उपयोग मुख्यतः SPA अर्थात single page application बनाने के लिए किआ जाता है।

इस ब्लॉग में हम सीखेंगे कि How to install React in Laravel, अगर आपको ये नही पता है की laravel में React का setup कैसे करते है तो इस पोस्ट में हम React का setup step by step करेंगे।

Laravel 8/7 में React Js का setup करने के लिए Laravel UI पैकेज का प्रयोग करेंगे। इस पोस्ट में हम Laravel 8 में React js का installation authentication या बिना authentication के करना सीखेंगे। laravel UI composer पैकेज का प्रयोग करके React JS install करना बहुत ही आसान है।

Laravel UI package हमे React, bootstrap, Vue और Angular Js को install करने की सुविधा प्रदान करता है। Laravel UI का उपयोग करके login और registration के auth scaffold का भी setup कर सकते है।

laravel 8 में bootstrap, React, Vue व Angular use करना बहुत ही आसान है।

Installing Laravel –

सबसे पहले हम terminal open करके एक fresh Laravel project बनायेंगे |

composer create-project laravel/laravel react-tut

अगर हमारे system में पहले से ही laravel installer install है तो हम नया laravel project इस command से भी बना सकते है :

laravel new react-tut

Install Laravel UI –

Laravel में React का setup करने से पहले हमे laravel UI package को install करना पड़ेगा।

Laravel UI को install करने के लिए हम इस code का उपयोग करेंगे –

composer require laravel/ui

Install React Js in Laravel –

Laravel में React install करने के लिए इस command का प्रयोग करेंगे –

php artisan ui react

Install React Js with Auth in Laravel –

अगर हम laravel में React को auth scaffold के साथ install करना कहते है तो हमे इस code को terminal पर डालना होगा –

php artisan ui react --auth

Required Packages –

अब हमारे laravel project में react js का setup successfully हो चुका है अब हमे कुछ required packages को install करने के लिए npm का प्रयोग करना पड़ेगा जिसके लिए हमारे मशीन में Node install रहना चाहिए।

Required packages को install करने के लिए हमे इन दो commands को run करना पड़ेगा –

npm install
npm run dev

अब हम Laravel सर्वर को चला कर (php artisan serve) अपना project run करा सकते है और React js की help से हम development कर सकते है |

How To Create Flutter Widgets – Introduction (Hindi)

Meet Shashwat Mishra, a passionate IT professional whose love for technology knows no bounds. With a keen eye for innovation and a knack for staying ahead of the curve, Shashwat dives deep into the ever-evolving world of IT, uncovering new trends, techniques, and technologies that drive progress. As the curator of a tech enthusiast blog, Shashwat shares his insights, expertise, and discoveries with fellow aficionados, sparking engaging discussions and igniting curiosity. With a finger on the pulse of the industry, Shashwat's articles are not just informative, but also inspiring, motivating others to explore, experiment, and embrace the limitless possibilities of the digital realm. Follow Shashwat on LinkedIn to embark on a journey of tech enlightenment and stay updated on the latest developments in the fast-paced world of IT.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *