Skip to content

Commit

Permalink
added a comment on react.js for future convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
Depayan Mondal committed Nov 17, 2024
1 parent aac0d49 commit 45374b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions users/discord/utils/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down

0 comments on commit 45374b7

Please sign in to comment.