Thoughts on extending the API
See original GitHub issueHi again!
Consider a scenario where inside of getComponent
, we’d like to return a React component rendered with either with renderReact
or renderReactStatic
, depending on the context (eg legacy reasons).
My initial thought is that we could do something funky like define NameOfComponent
and NameOfComponentStatic
and pass such args though the component name.
What would be even better though is to be able to define custom args; something like
{
"NameOfComponent": {
"name": "NameOfComponent",
"args": {
"renderType": "static",
},
"data": {
"theseAreProps": true,
"someOtherProps": ["one", "two", "three"]
},
}
}
and args
gets passed alongside name
to getComponent
.
Does this seem reasonable? Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Extending the Kubernetes API: What the Docs Don't Tell You [I]
Extending the Kubernetes API : What the Docs Don't Tell You [I] - James Munnelly, JetstackAt the heart of Kubernetes ... 5K views...
Read more >Web API Thoughts 3 of 3 - Extending Web API Documentation
One possible solution is to extend the API documentation provider so that Web API methods will be attributed with actual request/response ...
Read more >Extension API - Visual Studio Code
This documentation describes: How to build, run, debug, test, and publish an extension.
Read more >Extending the REST API (REST Application Developer's Guide)
You can extend the REST Client API in a variety of ways, including resource service extensions and evaluation of ad-hoc queries and server-side...
Read more >What is an API? - Red Hat
Innovating with APIs · Create new revenue channels or extend existing ones. · Expand the reach of your brand. · Facilitate open innovation...
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 Free
Top 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
Yes this sort of logic is best served by a hypernova-client like hypernova-react.
A hypernova client is just a function so you can do and return whatever you’d like.
I see, so your other server is the one that holds the knowledge on whether you want to render something static or non-static. If thats’ the case you can pass that sort of information down with the initial payload: