Comments (4)
so any example of what you are suggesting? Hooks are everywhere in this boilerplate. I don't understand what you suggest. Can you elaborate?
from react-boilerplate-cra-template.
I think this is related to #61 -- the Dan Abramov article people recommend for structuring apps with components and containers has updates at the top and bottom where he says he no longer recommends the distinction, and that it's largely irrelevant since React introduced hooks.
I'm not new to react, but I am looking at some alternatives before restructuring an app that has outgrown its original structure (and shifting to typescript for the same reason).
To start with, I didn't know what this project intended by the division until I looked at the placeholder code and messed around with a generated example of each. People use containers and components in so many different ways that clarifying it here might help.
Correct me where I'm wrong (and if I am wrong, then it's not just the authors of #64 and #61 who aren't sure), but something like this in the docs might help explain what this project means:
- components => independent and reusable elements, mostly UI stuff, that don't need their state preserved (buttons, styled text, a custom styled drop down menu, whatever); and,
- containers => more complex app elements that might have state, extensive logic, and other stuff going on.
FWIW, I'm thinking of structuring that app along the lines of the last scenario here: https://www.robinwieruch.de/react-folder-structure
AFAICT, there's nothing preventing me from doing that with this setup, and I could even use the generator to create the containers, then drag-n-drop them in VS code to where I want them nested and fix up any references that VS Code doesn't automagically fix.
from react-boilerplate-cra-template.
Here its roughly mentioned already with a link in the docs saying the you can bend the structure as well.
Folder structure is an example and doesn't dictate anything. Normally in my projects I change the structure according to the logic of the web app all the time. The generators are easily updatable and testable. I will write more details to the section in the link above to clarify more though.
from react-boilerplate-cra-template.
I am thinking of leaving container component structure behind. Will take this into consideration. Thank you
from react-boilerplate-cra-template.
Related Issues (20)
- This is the most retarded boilerplate I have ever seen HOT 2
- There is a way to use TailwindCSS on this boilerplate ? HOT 8
- Automating releases, tags, version, and the generation of the CHANGELOG.md file with github actions HOT 1
- Unable to resolve dependency tree HOT 3
- useInjectReducer updates store, leading to warning "Cannot update a component (x) while rendering a different component..." HOT 6
- Routing through <Link/> and <Navlink/> react-router-dom components did not work properly HOT 1
- How to setup Micro Front End apps with this template HOT 1
- How can i configured webpack for optimise.
- How to jump page in saga HOT 1
- Similar template for Next.js HOT 1
- CSS with Media Queries are Not Minified (SOLUTION ATTACHED) HOT 2
- Doesn't work until you manually add devDependencies to package.json HOT 1
- Installing and starting the template app results in the error 'Plugin "react" was conflicted between ".eslintrc.js"' HOT 2
- about Emotion css-in-js HOT 5
- Ejecting from CRA HOT 1
- yarn start gives error about styled-components with babel-plugin-macros. HOT 1
- Request to Make This Repository a Template HOT 1
- When we get new changes? HOT 1
- Unable to create React App with node 20 and yarn 4
- Discontinued ! (Checkout the example)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-boilerplate-cra-template.