React conversion #900
Labels
complexity: high
7 to 30 days of work (or longer), consider splitting
frontend
Presentation layer (visible to user)
React
JavaScript library: React
Milestone
Tasks
dangerouslySetInnerHTML
#1169Motivation
Currently we are facing several issues with frontend development.
It's impossible to find JavaScript errors in cshtml files at compile-time, rather than at run-time.
JavaScript code is scattered around ts and cshtml files, which makes code splitting and dynamic imports difficult. Now that we are using Webpack through Laravel Mix (#5 and #540, powered by ReMikus), we can easily make use of code splitting in React. See also #872.
The jQuery and jQuery UI packages cannot be upgraded easily, because there seem to be some breaking changes. This is why #675 and #679 cannot be merged.
It requires boilerplate code to translate user interfaces. In the current implementation, we need to
, which is a lot of pain. By using i18next and react-i18next, we can make this process a lot easier.
We have two different libraries for the same thing, for example marked and MarkdownSharp (#38 and #904).
Why React?
There are several reasons why I chose React, but the main reasons are that
I decided to use MobX, not Redux, for state management. This is because MobX API is surprisingly similar to Knockout's. The conversion shouldn't be that hard, although there are subtle differences in behavior between them (e.g.
subscribe
andreaction
).Of course this would be nearly impossible to do all at once, it has to be done gradually.
Examples
Before:
Who is the
$parent
in this context?After:
The text was updated successfully, but these errors were encountered: