Skip to content

Commit

Permalink
fix!: rename createWebComponent method (#19309) (#19356)
Browse files Browse the repository at this point in the history
* fix!: rename createWebComponent method

Rename the createWebComponent function
as the create gives the impression that
the function is heavy.

* renameMethod to reactElement

---------

Co-authored-by: caalador <mikael.grankvist@vaadin.com>
Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
  • Loading branch information
3 people committed May 13, 2024
1 parent e50bf4e commit e09dd4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ interface Properties {
* @param onload optional callback to be called for script onload
* @param onerror optional callback for error loading the script
*/
export const createWebComponent = (tag: string, props?: Properties, onload?: () => void, onerror?: (err:any) => void) => {
export const reactElement = (tag: string, props?: Properties, onload?: () => void, onerror?: (err:any) => void) => {
loadComponentScript(tag).then(() => onload?.(), (err) => {
if(onerror) {
onerror(err);
Expand Down

0 comments on commit e09dd4f

Please sign in to comment.