From 45374b7e1241c7b9890a9cbcefc9e0c214e683f1 Mon Sep 17 00:00:00 2001 From: Depayan Mondal Date: Sun, 17 Nov 2024 18:57:27 +0530 Subject: [PATCH] added a comment on react.js for future convenience --- users/discord/utils/react.js | 1 + 1 file changed, 1 insertion(+) diff --git a/users/discord/utils/react.js b/users/discord/utils/react.js index 3f6ccd09..ed807527 100644 --- a/users/discord/utils/react.js +++ b/users/discord/utils/react.js @@ -8,6 +8,7 @@ const render = function (element, container) { const component = document.createElement(element.tag); element.props && Object.keys(element.props).forEach((prop) => + // based on requirements, any other type of event listner can be added here as 'prop' prop == 'onclick' || prop == 'onsubmit' || prop == 'onchange' ? (component[prop] = element.props[prop]) : component.setAttribute(prop, element.props[prop]),