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.

Make front-end templates more idiomatic

See original GitHub issue

Right now the front-end templates used by create-near-app aren’t very idiomatic. It would be nice to improve this by creating libraries for each front-end framework like https://www.npmjs.com/package/near-react-hooks.

This has two major advantages:

  1. the developer experience is much better as the NEAR code fits in better with the chosen framework
  2. it will be easier to incorporate NEAR into existing applications by using the framework specific library directly.

If this is of interest I’d be happy to update the current react template to use near-react-hooks. Also I can work on creating an angular service library and a vue plugin.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mehtaphysicalcommented, Mar 17, 2021

Nice! ok i see the vision now. Seems legit to me!

1reaction
chadohcommented, Mar 17, 2021

I’m with you that near-api-js needs to support better code completion & inline documentation. And I agree that the use of window variables is unusual. (As an aside, for TypeScript projects there is a way around the lack of code completion with window variables: create a window.d.ts file. It seems like this would add potential errors to a generated JS project though, and would add cognitive overhead for developers in any case.)

Here are some ideas that will guide upcoming improvements to near-api-js; I’d love to get your thoughts: https://github.com/near-examples/guest-book/pull/161

I believe that this would also accomplish our shared goals of great code-completion and removing window dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Layouts | Bridgetown
Layouts are templates that wrap around your resource's content. They allow you to have the source code for your template in one place...
Read more >
foolin/goview - GitHub
Goview is a lightweight, minimalist and idiomatic template library based on ... Multiple Engine - Support multiple templates for frontend and backend.
Read more >
Do web developers prefer to work from templates or code from ...
I'm going to assume you're talking about front-end. Most developers have at least some sort of 'base code' that they use as a...
Read more >
templating - renderTemplate in a plugin for front end request ...
Digging a little more into this. If I pass a path for a template that doesn't exist I get an error message "Unable...
Read more >
10 Websites To Practice Your Frontend Development Skills
That's why in this article, we have gathered a list of 10 great websites where you can practice front-end development skills!
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