We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 7, 2022 5:57 PM - edited Nov 7, 2022 6:01 PM
I'm looking at some of the Forms we built using HubSpot, and I've noticed they all include data attributes like 'data-reactid=".hbspt-forms-0"'. There's also a JavaScript file imported from "/_hcms/forms/v2.js" that uses a lot of React functions:
Does HubSpot use the React framework alongside JQuery? If so, why do we need two frameworks? Wouldn't it be more efficient to build a CMS with only one? My React Dev Tools plugin says it's using an "older unsuported version" of React.
Solved! Go to Solution.
Nov 8, 2022 12:32 PM
Hi @marquizzo,
yes - HubSpot is build upon React but only for several years. There were times were HubSpot wasn't build on react - and tbh I don't know what was before that. I remember that the interface was using the most basic jQueryUi styling when I've started with HubSpot years back.
And since there are still functions requiring jQuery - it's getting loaded.
But HubSpot constantly improving everything and I'd say that there will be a day when jQuery will disappear from HubSpot(not the themes)
best,
Anton
Nov 8, 2022 12:32 PM
Hi @marquizzo,
yes - HubSpot is build upon React but only for several years. There were times were HubSpot wasn't build on react - and tbh I don't know what was before that. I remember that the interface was using the most basic jQueryUi styling when I've started with HubSpot years back.
And since there are still functions requiring jQuery - it's getting loaded.
But HubSpot constantly improving everything and I'd say that there will be a day when jQuery will disappear from HubSpot(not the themes)
best,
Anton
Nov 8, 2022 8:09 AM
Hi @marquizzo, I'm not using React on HubSpot but if you check their documentation you can see it's in BETA so not everything might be working as expected: https://developers.hubspot.com/docs/cms/guides/js-frameworks#reactjs
You can provide your feedback directly to the GitHub repository if you want 🙂