question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Text' component to use 'p' or span as default

See original GitHub issue

Have just picked this library up on a project, and so far so good. Except I worry about the fact that the default HTML element that is used for the <Text> primitive is a div - would there be pushback for me to PR to swap this to a p or span and add an as prop to change the base renderer?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:32 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
hasparuscommented, Nov 17, 2020

Okay, I don’t see another solution to this.

https://www.strawpoll.me/33187129

I’m biased towards no-paragraph & Text as span, because that’s how Braid does it, but I don’t care strongly about it.

cc @dcastil

2reactions
hasparuscommented, Nov 24, 2020

FWIW Text is also a global: new window.Text(‘hello world’).

It’s so annoying to auto-import it because of this -.- That’s a point in favor of Paragraph.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When to use <span> instead <p>? - Stack Overflow
Span is completely non-semantic. It has no meaning, and serves merely as an element for cosmetic effects.
Read more >
The Content Span element - HTML - MDN Web Docs
It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such...
Read more >
HTML Span: A Guide for Beginners | Career Karma
The HTML <span> tag is a generic container used to apply styles to specific elements on an HTML page. By default, the <span>...
Read more >
HTML span tag - W3Schools
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The...
Read more >
<p> vs <span> - HTML & CSS - SitePoint
Why should I use the <p> element to mark up something that is not a ... for a span of text and div...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found