nav
nav copied to clipboard
Switch to React for introducing component-based view system to frontend.
Todays solution:
The is no component-based system in place. Frontend view elements can not be reused as components. Imports are bulky since for each view element HTML, CSS and JS are separated (while practically they are always connected). This is not a modern approach to frontend development, and many developers need to learn this approach before being able to work with the NAV frontend code base.
Suggested solution:
Use React.js for implementation of reusable and adjustable frontend components.
Alternative solutions:
Framework Vue.js can be used instead of React.js library. The difference between the two solutions lays in what the developer team is more comfortable with.
Drawbacks: Introducing React.js is a heavy-weight task. There is existing frontend code base, so running handy create react app script is not possible. The process of introducing React.js is going to be manual, and one has to make sure that the existing app does not break due to changes.
Credit: The issue was suggested, and extensively described by @emilhf in Forslag til ny frontend-tilnærming I NAV [May 2017]