MithrilJS / MithrilJS/mithril.js
Mithril as UI Lib
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 14.5k
- Forks
- 922
- PR merge metrics
- No merged PRs in 30d
Description
Mithril as UI (virtual-dom) Lib
The functional programing (FP) philosophy is more than I will say,
but I want to focus on this:
Do a small functions that does only one thing.
The discussion is:
Does Mithril want to have FP style/structure?
If Mithril wants to fit in there, it would be better split it in some packages.
The Mithril's goal is to be an UI lib, and it does it pretty well.
As an example, Redux-thunk is the smallest package I know.
function createThunkMiddleware(extraArgument) {
return ({ dispatch, getState }) => next => action => {
if (typeof action === 'function')
return action(dispatch, getState, extraArgument);
return next(action);
};
}
I have used Mithril for small tasks, so I have used a small part of its API.
Maybe there is more to split, if this is approved.
The following are not UI related functions.
- Mihtirl-request
- Mihtirl-route (explained below)
- Mithril-stream
I always use stream. But others maybe not.
I do not use request -> fetch works. Maybe someone prefers axios.
Route is another history, I'm going to quote a section entitled "Waxing eloquent"
from chapter 9 of the Joreteg's Redux book (Recommended).
"Many times, we over-engineer by creating generic solutions that include
solutions for problems we don't actually have. It's tempting to use large
routing libraries just because of their pretty APIs when all we really
need to do is match a couple of strings."
I'm not saying Mithril-route is big, it isn't. He argue that Route
is an "App state" problem and uses Redux (of course) to deal with it.
Meiosis's route is coming.
With this we give the freedom of choice, and we don't have to carry
on extra weight, download code will never be used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the issue discussion and the existing request, route, and stream packages mentioned in the proposal. Determine whether Mithril should split these concerns from the UI library and identify the maintainers' desired package boundaries. Done means reaching and documenting a clear project decision; the issue does not name files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100