|
| 1 | +Roadmap |
| 2 | +======= |
| 3 | + |
| 4 | +2021-Q2 |
| 5 | +------- |
| 6 | + |
| 7 | +Element and Component Identity: |
| 8 | + At the moment, whenever a particular branch of a layout is updated, all the state |
| 9 | + (i.e. hooks and event handlers) that live within that branch are thrown away and |
| 10 | + reconstructed. Given IDOM's current implementation for |
| 11 | + :class:`~idom.core.layout.Layout` this is unavoidable. To resolve this issue, we |
| 12 | + need to add a concept of `"keys" <https://reactjs.org/docs/lists-and-keys.html>` |
| 13 | + which can be used to indicate the identity of an element within the layout |
| 14 | + structure. For example, if you have a list of elements that get re-ordered when a |
| 15 | + button is pressed, their state should be preserved, and reassigned to their new |
| 16 | + location in the layout. |
| 17 | + |
| 18 | + By default React requires keys to be used to communicate element identity whenever |
| 19 | + the order or number of simbling elements can change. While there are clear |
| 20 | + performance benefits for adhering to this stipulation, it's often confusing for new |
| 21 | + developers. React has the further advantage of the JSX syntax, which makes it easier |
| 22 | + for the program to determine exactly when keys must be supplied by the user. To make |
| 23 | + the experience for new users simpler, and due to a lack of inforcement via JSX, IDOM |
| 24 | + will be to assume that any element without a key is new. Thus, for IDOM, keys will |
| 25 | + primarilly be a tool for optimization rather than a functional requirement. |
| 26 | + |
| 27 | + Related issues: |
| 28 | + |
| 29 | + - https://github.com/idom-team/idom/issues/330 |
| 30 | + - https://github.com/idom-team/idom/issues/19 |
| 31 | + |
| 32 | +Reconsider Custom Component Interface: |
| 33 | + One problem that's come up several times while implementing alternate client |
| 34 | + solutions with React is that custom components must use the same React instances |
| 35 | + as the client. This is problematic for developers of these custom components because |
| 36 | + they need purpose-built |
| 37 | + `compiler plugins <https://github.com/idom-team/idom-react-component-cookiecutter/blob/1cc31b8690f84cb90dd861f2f47873b1d5711f74/%7B%7Bcookiecutter.repository_name%7D%7D/js/rollup.config.js>`__ |
| 38 | + that will convert imports of React to point to the location ``react.js`` will be |
| 39 | + once the component has been loaded via :class:`~idom.client.module.Module`. |
| 40 | + |
| 41 | + Ideally developers of custom components should be able to operate in isolation |
| 42 | + without assuming anything about the environment they are running in. This has the |
| 43 | + benefit of simplifying the development workflow as well as making it possible to |
| 44 | + incorperate components from other Javascript frameworks (e.g. Vue) without much |
| 45 | + effort. |
| 46 | + |
| 47 | + Related issues: |
| 48 | + |
| 49 | + - https://github.com/idom-team/idom-jupyter/issues/13 |
| 50 | + - https://github.com/idom-team/idom-dash/issues/6 |
0 commit comments