@@ -7,7 +7,9 @@ highlighted features.
77
88# v7.2
99
10- This release introduces ** parameterized queries** to TinyQL - finally!
10+ ## Introducing Parameterized Queries!
11+
12+ This release introduces parameterized queries to TinyQL - finally!
1113
1214These allow you to define queries using named 'params' that you can then easily
1315update to change the query's results - without redefining the whole query each
@@ -48,13 +50,47 @@ any part of the query definition that you would like. Listeners also work as
4850expected - if you are listening to a query's results, and you change a param
4951that affects those results, your listener will be called accordingly.
5052
51- For React users, We also shipped the useSetParamValueCallback hook and the
52- useSetParamValuesCallback hook, which let you easily update param values from,
53- say, an event handler in your application.
53+ This is TinyBase so you shouldn't be surprised, but params themselves are
54+ reactive! You can get and listen to their values with the getParamValue
55+ method and addParamValueListener method for example.
56+
57+ For React users, we also shipped a bunch of new hooks that cover params in
58+ exactly the way you would expect, including the useSetParamValueCallback hook
59+ and the useSetParamValuesCallback hook, which let you easily update param values
60+ from, say, an event handler in your application.
5461
5562We know this has been a long-awaited feature, so we hope you enjoy it! See the
5663TinyQL guide for more details, and please let us know how it goes!
5764
65+ ## Demos
66+
67+ We have updated the Movie Database demo to use parameterized queries, and as a
68+ result is more efficient and easier to (we think) understand. See the
69+ ` yearGenreMovies ` , ` directedMovies ` , and ` appearedMovies ` queries to see
70+ params in action.
71+
72+ ## Full API additions
73+
74+ This release includes the following new Queries interface methods:
75+
76+ - getParamValues method
77+ - getParamValue method
78+ - setParamValues method
79+ - setParamValue method
80+ - addParamValuesListener method
81+ - addParamValueListener method
82+
83+ It also includes the following new React hooks:
84+
85+ - useParamValues hook
86+ - useParamValue hook
87+ - useSetParamValuesCallback hook
88+ - useSetParamValueCallback hook
89+ - useParamValuesListener hook
90+ - useParamValueListener hook
91+
92+ Check out the API docs for each. They should seem very familiar!
93+
5894---
5995
6096# v7.1
0 commit comments