Mojang / ore-ui

💎 Building blocks to construct game UIs using web tech.
https://react-facet.mojang.com/
MIT License
404 stars 19 forks source link

Do not mix data and methods in sharedSelector #116

Closed vb closed 7 months ago

vb commented 1 year ago

As discussed on FE tech collab 2023-02-28

This PR propose a new type that ensures that the return type of the selector does not mix methods and data

Discussion

Improvements

xaviervia commented 1 year ago

We talked a bit about this and figured out that it's probably best to create separate functions that implement the new types, to avoid breaking changes. We can mark the current shared facet functions as deprecated to remember to move away from them in the future.

Shenato commented 7 months ago

A new facet API might be introduced soon which will render this PR obselete, consider taking up the effort again after such change is done if it is not already included in the scope of the API change.