Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guidance on use of "input" tag with "placeholder" attribute using Components #87

Closed
asutherland opened this issue Mar 9, 2015 · 6 comments

Comments

@asutherland
Copy link

From reading the docs, it's not immediately clear to me how I should be creating an input element using a placeholder attribute using react-intl. Currently I would guess I should use formatMessage(), but http://formatjs.io/react/ says "these methods will likely be deprecated in v2.0, so use the Components." and I'm not sure how to do that. I did look in the provided example and I think I read/searched the docs sufficiently, but I could be missing something. If it is missing, I think it would be a great addition to the docs!

@ericf
Copy link
Collaborator

ericf commented Mar 9, 2015

I guess the guidance for now would be to use this.formatMessage() in this case since there isn't another option right now. Once we have a better option, we'll setup a migration path.

@ericf
Copy link
Collaborator

ericf commented Mar 9, 2015

As for the docs, if you're feeling up for it, you could send a PR to the website adding an example like this :)

@asutherland
Copy link
Author

Thanks for the super-quick reply! I need to gain a little more experience with react and input elements before I will feel confident about the quality of advice I can dispense, but that should hopefully be later this week. I'd be happy to provide a pull request at that point.

@asutherland asutherland changed the title Guidance on use of "input" tag with placeholder "attribute" using Components Guidance on use of "input" tag with "placeholder" attribute using Components Mar 9, 2015
@surkova
Copy link

surkova commented Jun 3, 2015

I have exactly the same issue right now and this.messageFormat() doesn't exist. Did you guys do anything to get a better support of i18ned attributes?

@ericf
Copy link
Collaborator

ericf commented Jun 11, 2015

@surkova sorry, typo: this.formatMessage(). (I updated my original comment)

@ericf
Copy link
Collaborator

ericf commented Sep 11, 2015

See: #162

@ericf ericf closed this as completed Sep 11, 2015
longlho pushed a commit that referenced this issue Apr 27, 2020
Improve browser bundling with Browserify/Webpack
longlho pushed a commit that referenced this issue Apr 27, 2020
* test descriptions as objects

* tabs to spaces

* pr feedback

* remove some whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants