Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Embed Vanilla Forums in ReactJs app
silviucuruciuc
New
Hello,
After succesfully installing the vanilla forum I am now trying to embed the forum on my ReactJs application. My plan is to route "/forum" of my app to a component that should contain a reference to my embed.js file of the Vanilla instalation.
The method that I tried is not working, could you please advise on how to embed in ReactJs app?
This is the way that I tried to embed the forum in my React component:
import * as React from 'react'; export class Forum extends React.Component { componentWillMount() { const script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://mydomain.com:8082/js/embed.js'; script.async = true; document.body.appendChild(script); } render() { return ( <div className="vanilla-credit"> <div className="vanilla-credit"> <a className="vanilla-anchor" href="http://vanillaforums.com"> Discussions by <span className="vanilla-logo">Vanilla</span> </a> </div> </div> ); } } export default Forum;
1
Comments
Do you have any update on it matter? I'm having the same problem