Closed lenoirzamboni closed 4 years ago
@barbosa @pedrohperalta can you take a look at this? Feel free to comment on it and bring other ideas and suggestions.
@lenoirzamboni good ADR 🙂
Which of the two options are you more inclined to use? And why?
@lenoirzamboni good ADR 🙂
Which of the two options are you more inclined to use? And why?
@barbosa I'm inclined to use the second option. I believe it's a more common approach, easier to understand and use.
Great!
I also like option 2.
Option 1 works fine but I believe it exposes to much the internal implementation. Although we're not limited by that, I'd prefer option 2's ability to have clear and well-defined methods/API.
The con mentioned in option 2 doesn't worry me that much since I think it's implicit that every time we change something on the native side, we'd need to make sure the external contract won't break.
@barbosa All right! I'll work on these changes then!
Architecture Decision Review - ADR
We need to discuss a better way to pass parameters to the native side while using the API methods. The current way is not so didactic, and this can cause confusion and even errors while using the library.
We have two options:
Pros:
index.js
;index.d.ts
.Cons:
Example of this idea:
index.js
and futureindex.d.ts
. These methods would accept objects defined by interfaces that we can also create and export to the user.Pros:
Cons:
Example of this idea: