-
-
Notifications
You must be signed in to change notification settings - Fork 359
Frontend libs #34
Comments
Given the requirement, I think a server side rendered app would be more beneficial for SEO I propose using nextjs instead of cra |
@Utkarshbhimte We already said that Next will be used, so create next app? |
Also IMO if we use Redux we should use ReduxThunk because it's easier to get into for people who havent working with it in the past, and is generally more widely used lib |
Are we going to use some UI library? If so, I'd like to propose Chakra-UI, it's a really simple and composable component library crafted with accesibility in mind and uses emotion and Styled System. It's also OS. |
For UI Library, i would like to suggest React Ant Design. It has a rich set of components ready to be used, and unlike other component library its UI is sorta new to other users. |
I think redux is a must for any non trivial application with state. It just makes doing React state management much much easier. |
Thoughts on using formik & yup for form validation? Both are well documented / supported libraries. It helps immensely to standardize validation as well. For api calls, I would suggest axios. |
We already agreed to use next.js you can see the discuss here @isubasinghe as for state management, we still haven't figured it out whether to use it or not, as we are still blind here |
If we do consider using Redux for application state management, then it's worth giving redux-query a read. It's a seamless way to manage the network state into your Redux store. |
Never heard of redux-query, anyway probably we should list what kind of libs that we are going to use, at least we can discuss the pros and cons of each libs |
Redux-saga is really hard to grasp, specially for people not that experienced in JavaScript... |
I've had a lot of success with Material UI, however that would mean ditching CSS for JSS. |
and for others libs: |
If Redux is used carefully and appropriately it can be good but it can also get messy, I've seen large project turn into spaghetti by relying too much on Redux, especially around keeping the DB/server state in sync with the client state. GraphQL solved this for me but I know we're not doing that for v1 of Chapter. Worth looking at all the alternatives. Hooks, Context, unstated, URL state, etc. +1 for Ramda, it's so great. |
I assume most people use Moment for date/time calculations. I've recently started using date-fns and quite like it. |
date-fns is referable, personally. You could imagine the space moment import eats up. |
We can consider using Immer.js. It can help to work with immutable states in a very clean and easy way. Helps a lot to avoid accidental state mutations and makes the app more predictable I believe. It's quite good for managing complex state objects or redux state and is very easy to learn and use. |
linaria is a drop-in replacement for styled-components, it tends to produce lighter JS bundles (in exchange for statically generated css) and more performant instances (setting CSS variables is exceedingly fast). |
I think Ramda is too much for the moment, since introduces a complexity for those that are not used to FP. The idea is to keep this as simple as posible. |
Since React requirement is locked down, may I suggest Gatsby as a more turn-key solution? Gatsby
While Gatsby has a vs Next page, let me add my observation: Next
There is "Create React App", are there other React bootstraps we should look into? Disclosure, Somehow I was added to Gatsby organization. Might be my mis-click, someone like me?? I think I might have submitted 1-2 doc PR fixes, but I'm not really that involved with the project. |
I use the Material Ui in a large scale software and I had a lot problem to customize the components, I prefer the ant design for use here |
I hear people advising some kind of state management solution but I also share the opinion of avoiding redux at all costs. However we would need an alternative. Let me present you https://overmindjs.org Overmind works amazing with React as a hook or HOC. You can write regular mutation code (so no immer needed) it has amazing async or promise support (so no need of thunk sagas etc) and it's a single state tree that you can define however you want. The experience is amazing with typescript but I read we decided not to use it. Anyways Overmind can be used with Javascript anyways. It is really easy to use and it now has statecharts support. If you feel we need a better option of state management defibetly check this out. |
We use Material UI and while I like it very much, it is very opinionated and uses JSS which I think goes against the preferences for this project. I would prefer to keep styling to CSS or SCSS. A UI library would definitely help though. Are there any suggestions other than Material UI? An alternative to Moment other than date-fns can also be DayJS. I also really like react-i18next as it makes internationalization a breeze. |
@corlaez I strongly agree with him, because if we structure our app properly then actually we don't need redux, I've seen project using redux and confusing for new comer, and slow down development, as new comer spend more time understanding the redux instead developing the features |
I've worked with React for a few years, these are my recommendations: Styled-components: Makes writing css so much easier, never having to think about global stuff, naming classes, unused css etc. MobX: My preferred state management solution, if just React state/Context is not sufficient. Much easier to work with than redux. Formik: Tried it once and have not looked back. Makes handling forms in react so much nicer UI-lib: Didn't have good experiences with Material UI, I would prefer react-bootstrap or any other simple lib for buttons, modals etc. Cypress: for e2e testing. |
Whatever UI library is chosen, it should be something lightweight. I’m a fan of Skeleton, especially since this project is CSS only. It’s 300 lines of CSS that you can customize without needing !important tags or other shenanigans. Anything with a grid system is too much. Now that CSSgrid is a thing and there are graceful fallbacks using the @supports tag for the small percentage of browsers that won’t support it. Also, the more components to build, the more chances people will have to learn. |
In as much we would be writing the CSS without any library. Styled component is a very good plugin that would help writing the style of any component in Js. Every reusable component should have its styles embedded in the Jsx file not an external file , this will ensure that we don't bother too much on maintaining extra style sheets especially when the project is becoming large. |
@mquadrant I agree, and styled-component compiles down to CSS anyway, so I don't see much downsides there |
@mohanwer I just found React Hook Form recently and I think it would be a lot easier to work with than formik. It has its own validation out of the box or you can use yup. |
What about using Semantic-UI with Styled component. Or we can also use ionic which has recently added React components. https://ionicframework.com/blog/announcing-ionic-react/. |
All of these are great suggestions, but I feel like we shouldn't try to solve problems we don't already have - if we need a library we can find it. |
I think for MVP we should stick to React, React-Bootstrap, and CSS. We can add additional libraries and functionality for future releases, but MVP should be achievable in the near future! We could implement container components to create event cards, add test users, and be able to demo the app. After MVP, it'd be beneficial to refactor into React-Redux as the app scales. |
Everyone talking about bootstrap, but nobody talks about design system , the rebass lib ? And i saw some comment saying they had bad experience with material-ui please share why ! I'll Start: i am using material ui since V1 in my company wich is one of the biggest french company, with more than 800 software engineer. In the begining material ui was not friendly at all, v1 and v2 had a lot of issues, but now the community and the core members did a lot of work to make things more maintenable, But still i am not a huge a fan of the lib JSS they are using but except for that, perfs are now good, the Doc is gold, they implemented design system, the community is huge and reactive! When we talks about libs to use in this kind of project, i think we have to ask ourselfs the impacts and why it would make life of everyone easier. Personnaly seeing react-boostrap feels like seeing people asking for JQuery 😱 But for the rest share your experiences with some pro and cons, that will make the debate more open to discuss about it. Thanks ! |
I hope this helps, but I'm gonna list out every libs here that already been mentioned above, and we can decide it later which one will be used, as for this moment we are still blind so having people discussing which librs better than others, aren't beneficial for now (IMHO) Design System
State Managements: Translation Date: Forms: Again we are pretty much blind here, so thinking of what libs should be used, isn't the priority right now, if someone can come up with a mock up based on the existing schema and routes, I think it will be much helpful to think what kind of libs we are going to use |
100%. But we need to keep maintainability in mind. How hard is it for a potential contributor to get up-to-speed and able to update the codebase? freeCodeCamp started out using a lot of tools, and over the years, we've stripped most of them out because they made it harder for people to contribute to the codebase. Also, some of the tools listed on this thread are likely to become deprecated in the coming years. This is hard to predict. But it can lead to a lot of additional maintenance work. This is a long-term project that organizations will use for decades to come. The initial time spent building this project may only be 20% of the total work. The rest will be spent doing maintenance, so we should be sure to optimize for that. |
Agreed, from zero to hero. xD from simlpe to complex. We don't need a big stack at the begining. |
@QuincyLarson Yes. Perfect! That's what I was thinking. I would recommend starting with a basic stack as already mentioned on README and then we can always add more tools in the future. Let's kick off this project asap instead of getting confused with stack & design. :) |
React Ant Design may have issues with i18n (Internationalization) and localization for future prospects. I've had hard time figuring things out with it, if anybody has a way around it, I would like to hear it. |
yes, everyone loves sharing their fav stack and tools, and their horror stories ha ha (me included) i defer to the coding education experts on this! :) excited to break ground. go team! |
#76 is asking about testing. Should that conversation remain independent of this one, or shall we merge them? |
@allella Let it be a different issue. |
I think it should be a different issue as testing applies to the backend too. |
We have been discussing in #20 how to build the mobile client. I've been championing React Native, which has been met with some support. This opens up the opportunity to make the mobile client from the same codebase using React Native Web (which transpiles abstract universal UI elements like If RNW were chosen over React DOM, this would have an impact on the selection of frontend libs that we may consider.
The React Native Web library itself provides a lot of functionality (as it has to implement all of React Native), so there are some handy libs in there. It also opens up the ecosystem of React Native libraries to some extent, like react-native-reanimated, an animation/gesture-handling library. |
@shirakaba I love this idea. I'm taking a similar approach with one of my projects at work and I think it makes a lot of sense. One codebase to rule them all! :) |
@shirakaba We can consider mobile UI options once we've built the web version for our MVP. I think React makes the most sense here so I'm going to go ahead and close this issue. |
RE: UI frameworks #114 (part of the roadmap) holds some of the UI framework conversation, along with #121 and this issue. Also, Quincy's vote was for using a UI framework to start and not custom-building from the start.
|
React Native Web and React DOM are both “React”; just that the former transpiles to React DOM while the latter is React DOM. For clarification, are you talking about going ahead with direct use of React DOM? |
As per finalised tech stack frontend will be "React using JavaScript (not TypeScript) and CSS (not Sass)"
Would like to discuss on which packages/libraries are best suited with react echo system ?
Will use any boilerplate ?
These two almost provides readymade support for transpiring and bundling and makes app production ready from day one.
Other useful packages I would like to add:
Would like to hear community thoughts and experience with this and any other useful packages, we can include in frontend tech stack
The text was updated successfully, but these errors were encountered: