Expose imperative API
See original GitHub issueExpose an imperative API for manipulating queries from outside the component.
There are several options for API design:
- Hooks (
useQueryBuilder
?). Not sure how that would connect with a specific<QueryBuilder />
instance, in case there were multiple being rendered. - Refs. Might have to wrap the main component with
forwardRef()
, but maybe not. Seereact-select
implementation offocus()
andblur()
methods. - Callback that provides an
api
parameter, a la AG Grid. This would probably be the easiest to implement.
@zukilover, since you gave me the idea, do you have any preference among the API design choices?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Managing Kubernetes Objects Using Imperative Commands
Kubernetes objects can quickly be created, updated, and deleted directly using imperative commands built into the kubectl command-line tool.
Read more >API Imperative: From IT Concern to Business Mandate - WSJ
The API imperative—the strategic deployment of application programming interfaces to facilitate self-service publishing and consumption of ...
Read more >Integrating imperative APIs into a React application
A component that wraps an imperative API with a declarative facade should be capable of translating changes in input into the correct sequence ......
Read more >Expose native imperative API · Issue #1819 - GitHub
Might have to update Java to keep some MediaPlayer state information around to handle .play and .pause being called on a MediaPlayer instance ......
Read more >Why Kubernetes REST API is imperative? - Stack Overflow
The Kubernetes API is declarative in the sense that you always specify what you want, e.g. replicas: 2 instead of e.g. create 2...
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
While callback is the easiest one, the original purpose of the request was really to enhance
controlElements
, so that we could rearrange the interfaces as much as we like. With that in mind, I think refs is the most elegant way of doing it.Yeah, it’s probably better to wait to address this until after 4.0 is released, anyway. Lots of churn in the codebase at the moment.