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.

Revamping Components - Typescript Types

See original GitHub issue

I’m going to work on expanding the type definitions that were part of #86, in order to improve usability in a Typescript context. Specifically, the goal is to type all of blessed this will probably take a while, but bare with me 🙂

I have a few questions on naming and conventions moving forward.

  1. The Components created by react-blessed are intrinsic types of React and therefore don’t require an import, is there a reason to use this approach following other component libraries and requiring imports?

  2. Components have lowercase names? I don’t believe the issue that #86 solved is still a problem, right? So we could feasibly remove the prefix of blessed- and capitalize them following React conventions?

Would greatly appreciate feedback and reviews in the future to improve the state of the project, assuming that these changes are wanted if they’re not please say so ❤️

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
defnotrobbiecommented, Jul 9, 2021

new definitions for react-blessed were published yesterday. they use module augmentation on react and jsx to replace html intrinsic elements with react-blessed elements (with and without the blessed- prefix). I’m not sure they’re 100% complete (I didn’t write defs for escape and program, for example) but they cover the example code and work for a small project I used them in.

1reaction
OnkelTemcommented, May 4, 2021

Thanks @NickHackman for the reply.

I’ve actually switched to a different framework — https://github.com/vadimdemedes/ink It’s actively developed and looks more up to date (along with types).

As for blessed, it doesn’t seem to be maintained as you know. That doesn’t necessary signals a problem — maybe it’s already ideal and there’s no bugs! eh? — but that’s unfortunately not the case and their issue queue has ~200 unresolved tickets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React with TypeScript Cheatsheet - Bits and Pieces
Both type and interface from TypeScript can be used to define React props, components, and hooks. From the TypeScript Handbook: Type aliases and ......
Read more >
TypeScript Generics Explained - Creating Reusable ...
Learn how you can leverage TypeScript generics to create reusable components across a variety of types within your JavaScript application.
Read more >
React and TypeScript - Components.Guide
Declaring React prop types with TypeScript. Use an interface named after the component with a Props suffix. Remember to export it too as...
Read more >
Make your react component generic with Typescript - Medium
Using Typescript generics turns out to be a way to make the component cleaner and keep it open for extension, but closed for...
Read more >
Build a component library with React and TypeScript
Learn to create a component library with React and TypeScript in this in-depth tutorial that includes testing and deploying to npm.
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