Rendering with id and default value
See original GitHub issueIn my staging environment I want to wrap my translations with a span, so the translator can hover the text to see which translation key needs to be used.
I’ve checked the defaultRender
and render
methods and this could do the trick, but I need access to the message id and the default message, this is not passed through.
My suggestion would be to pass it through when a Component
is used in the render methods, ie:
({id,default,translation}) => translation
Any thoughts?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
React render input with default value in separate function to ...
Create a function/component with input tag and pass the props that you want in your input fields like type, placeholder, name, id etc.....
Read more >A complete guide to React default props - LogRocket Blog
Cover three ways to implement default props in React and provide default values for props that are not required by the component.
Read more >I can't render default values on form element in theme_table()
Show activity on this post. I create the elements dynamicaly in ajax and i have common problem. The #default_value if not acting in...
Read more >Layouts and Rendering in Rails - Ruby on Rails Guides
You can render the default view for a Rails template, or a specific template, or a file, or inline code, or nothing at...
Read more >How to set default value in select using ReactJS
You can use an attribute defaultValue to set the default value in the Select menu If none option is integrated with this attribute...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had exactly the same usecase in my mind yesterday when I was refactoring
Trans
component. This could work as an in-context editor. You would have a expandable sidebar with a list of all messages on the page. Then we just need a local server which will communicate with sidebar and we can even edit/save messages from the website 👌I’m closing it in favor of
next
branch and upcoming v3 release. Feel free to send a PR if you want to backport it to v2.