How to include html view files in react.js Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!How do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I check if an array includes an object in JavaScript?Convert HTML + CSS to PDF with PHP?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How to decide when to use Node.js?How do I remove a particular element from an array in JavaScript?How to access the correct `this` inside a callback?

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

If the probability of a dog barking one or more times in a given hour is 84%, then what is the probability of a dog barking in 30 minutes?

How does Belgium enforce obligatory attendance in elections?

Dynamic filling of a region of a polar plot

How much damage would a cupful of neutron star matter do to the Earth?

Drawing spherical mirrors

Does the Mueller report show a conspiracy between Russia and the Trump Campaign?

In musical terms, what properties are varied by the human voice to produce different words / syllables?

Deconstruction is ambiguous

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Google .dev domain strangely redirects to https

How do I find out the mythology and history of my Fortress?

Time evolution of a Gaussian wave packet, why convert to k-space?

What would you call this weird metallic apparatus that allows you to lift people?

Why are vacuum tubes still used in amateur radios?

What is the chair depicted in Cesare Maccari's 1889 painting "Cicerone denuncia Catilina"?

How does the math work when buying airline miles?

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

An adverb for when you're not exaggerating

How to save space when writing equations with cases?

Co-worker has annoying ringtone

Is there hard evidence that the grant peer review system performs significantly better than random?

Crossing US/Canada Border for less than 24 hours

How can I set the aperture on my DSLR when it's attached to a telescope instead of a lens?



How to include html view files in react.js



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!How do JavaScript closures work?How do I check if an element is hidden in jQuery?How do I check if an array includes an object in JavaScript?Convert HTML + CSS to PDF with PHP?How do I redirect to another webpage?How do I include a JavaScript file in another JavaScript file?How to check whether a string contains a substring in JavaScript?How to decide when to use Node.js?How do I remove a particular element from an array in JavaScript?How to access the correct `this` inside a callback?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I have a web app developed in Laravel with blade.html views, I want to create a new feature which will be created in React Js and it will use some of html view files.
Now i have tried setting "innerhtml" and including html view files in react js but i can't access my php variables and methods.
how can i include html view files in React Js?










share|improve this question




























    2















    I have a web app developed in Laravel with blade.html views, I want to create a new feature which will be created in React Js and it will use some of html view files.
    Now i have tried setting "innerhtml" and including html view files in react js but i can't access my php variables and methods.
    how can i include html view files in React Js?










    share|improve this question
























      2












      2








      2








      I have a web app developed in Laravel with blade.html views, I want to create a new feature which will be created in React Js and it will use some of html view files.
      Now i have tried setting "innerhtml" and including html view files in react js but i can't access my php variables and methods.
      how can i include html view files in React Js?










      share|improve this question














      I have a web app developed in Laravel with blade.html views, I want to create a new feature which will be created in React Js and it will use some of html view files.
      Now i have tried setting "innerhtml" and including html view files in react js but i can't access my php variables and methods.
      how can i include html view files in React Js?







      javascript php reactjs laravel react-redux






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 22:10









      Abdullah chaudharyAbdullah chaudhary

      111




      111






















          1 Answer
          1






          active

          oldest

          votes


















          1














          innerhtml will not work for React.



          Take a look at dangerouslySetInnerHTML.



          It can be used in this way:



          <div dangerouslySetInnerHTML=__html: 'First;<br/> Second....' />


          Although, writing your views in react would be the better option if that is doable.






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071700%2fhow-to-include-html-view-files-in-react-js%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            innerhtml will not work for React.



            Take a look at dangerouslySetInnerHTML.



            It can be used in this way:



            <div dangerouslySetInnerHTML=__html: 'First;<br/> Second....' />


            Although, writing your views in react would be the better option if that is doable.






            share|improve this answer





























              1














              innerhtml will not work for React.



              Take a look at dangerouslySetInnerHTML.



              It can be used in this way:



              <div dangerouslySetInnerHTML=__html: 'First;<br/> Second....' />


              Although, writing your views in react would be the better option if that is doable.






              share|improve this answer



























                1












                1








                1







                innerhtml will not work for React.



                Take a look at dangerouslySetInnerHTML.



                It can be used in this way:



                <div dangerouslySetInnerHTML=__html: 'First;<br/> Second....' />


                Although, writing your views in react would be the better option if that is doable.






                share|improve this answer















                innerhtml will not work for React.



                Take a look at dangerouslySetInnerHTML.



                It can be used in this way:



                <div dangerouslySetInnerHTML=__html: 'First;<br/> Second....' />


                Although, writing your views in react would be the better option if that is doable.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 8 at 22:36

























                answered Mar 8 at 22:20









                Miroslav GlamuzinaMiroslav Glamuzina

                2,49021023




                2,49021023





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55071700%2fhow-to-include-html-view-files-in-react-js%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved