Skip to main content

All Questions

0 votes
1 answer
26 views

Trouble mapping directories

I have a problem with my folder mapping in a react project. Below the files and project structure. Anyone could tell me why its not working? My react is in version "react": "^18.2.0���. ...
Camila Nepomuceno's user avatar
0 votes
1 answer
49 views

Should i import css into a next page?

I want to ask if css can and should be imported into next pages. is the page structure below acceptable, or what is the standard practice /pages /home index.js index.module.css ...
Golden_remi's user avatar
0 votes
1 answer
23 views

Structured directories on ReactJS with JavaScript

I trying to export all component from folder components, and I create index.js to export all component inside components folder, here's my code : // @flow import Button from './Button/Button....
user avatar
0 votes
1 answer
150 views

How do I conditionally show text field in react?

I have some categories in the folder structure by clicking on one of the folders or files and then clicking on the 'new' button. I need to add a text field below that in a tree structure. How can I ...
Anuradha Karaguppi's user avatar
0 votes
2 answers
901 views

How to organize one React component with different wrapper components?

I need some ideas for a folder structure/mental model in React. I have an Item component. It stays the same. It can be wrapped in either a Link with a URL prop or a Button with an onClick prop. My ...
Des's user avatar
  • 273
1 vote
0 answers
156 views

Is it a good practice to put two components into one feature folder in Redux toolkit?

Let's say I have a feature of userStats and I want to use one data (from userStatsSlice) in two different components, Balance and Debt. Is it considered a good practice to put Balance and Debt ...
szachy113's user avatar
0 votes
1 answer
741 views

Visual Studio Code (VSC) local workspace with cloud based locations/drive (folders\files). Possible?

Is is possible to have a workspace (in VSC or any IDE) whereby said local project/folder contains 1 more or more sub folders that are cloud based (such as iCloud)? I have a standard create react app &...
SarahJ's user avatar
  • 51
3 votes
1 answer
5k views

Folder structure in react: Could not find a required file. Name: index.js

So I moved the contents of my src folder into a folder i created called app folder. I am building my project a hospital management system with electronic patient records. I see a lot of future in this ...
code46's user avatar
  • 117
2 votes
2 answers
3k views

Where to put styled components styles [closed]

components for styling my react app, so far i had a separate folder in each page's folder called Styles and stored my styled component wrappers inside it( e.g. ThemeToggler.Style.js or Section.Style....
TimeRunner2359's user avatar
1 vote
1 answer
3k views

React nested routes for every folder

I need help to understand how routing works in React. Currently all my routes are defined in App.js file like this : function App() { return ( <Fragment> <div id="sys_slot&...
qwertyMen007's user avatar
1 vote
1 answer
761 views

Understanding featured based folder structure for React projects

I'm using a featured based React architecture documentation and I get the general concept behind it, but I have some questions about it: What If I need to use code of one feature in other feature? ...
Cristian Flórez's user avatar
2 votes
1 answer
4k views

Folder structure for backend and frontend

Im setting up a project with a express node.js backend and react frontend. This is my first time setting a project up with a backend and their are a few things im unsure of... First question: So my ...
Halp_am_stuck's user avatar
0 votes
2 answers
2k views

script.js doesn't load in my create-react-app

I am pretty new to coding and I am currently trying to solve a challenge from frontendmentor.io where my task is to build an ip-address-tracker. To make this task a little bit more difficult for me, I ...
Bryan Hain's user avatar
-1 votes
1 answer
119 views

Importing a component from containers (From outside of the scope)

I'm quite new to react and am having some troubles with this basic problem. From HomeLander.js - How can I import a Button, and a P? They are, as expected, not in the same scope. Is there a neat way ...
Bjorn's user avatar
  • 5
0 votes
1 answer
206 views

Should i use actionCreators in Component's folder level in my React-Redux project?

I am using redux in my React project. And i have splitted my folders like in that picture: Folder structure of my store But my folderActionCreators file so growed while i developing the project. This ...
Lepuz's user avatar
  • 9

15 30 50 per page