Skip to content

set tag name dynamically#7

Open
gersonlimadev wants to merge 2 commits intoGA-MO:masterfrom
gersonlimadev:master
Open

set tag name dynamically#7
gersonlimadev wants to merge 2 commits intoGA-MO:masterfrom
gersonlimadev:master

Conversation

@gersonlimadev
Copy link
Copy Markdown

No description provided.

Comment thread src/react-skrollr/Parallax.js Outdated
const { data, children } = this.props
return <div {...data}>{children}</div>
const { data, tag, children } = this.props
const Tag = !tag ? 'div' : tag;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this line to be like this?

  const Tag = tag || 'div'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, great tip!

@GA-MO
Copy link
Copy Markdown
Owner

GA-MO commented Sep 27, 2018

@gtlima
Please add a document for using in README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants