Comments (6)
https://github.com/International-Slackline-Association/slackmap-ui
I have been working on this. You can see the new setup I made without injectors npm package. I don't have free time yet to update this repo, but if anybody is interested in solving it on their own then take a look. It's straightforward and explicit. Its in src/store
.
By the way, it uses RTK Query instead Saga. Plus, it's really a web app working if you need some project references :)
from react-boilerplate-cra-template.
hmm, I have no solution within this repo atm. I already removed redux-injectors lib out of this repo and implemented them manually since that repo is dead. But, it will take a while till I release this version (winter probably. Have no time in summer).
from react-boilerplate-cra-template.
@Can-Sahin where is it available? How do I implement?
from react-boilerplate-cra-template.
Same issue. Waiting for a new release
from react-boilerplate-cra-template.
To others, I simply removed the injectors. This issue may cause some unexpected behaviors in the frontend.
from react-boilerplate-cra-template.
Just chiming in that this issue seems to occur when using RTK's dispatcher within a NextJS SSR block. I have a simple app skeleton that I am building out. It is using the SSR block to set the nav links into the state depending on the URL parameters. There is nowhere in the app's components where the store is changed other than with an onClick
handler.
When I transition from the first page to the next this warning appears. The only way I can make it go away is by removing the NavLinks
component which is using useAppSelect
to get the nav links from my state/store.
Example SSR Block:
export const getServerSideProps = wrapper.getServerSideProps(
(store) => async () => {
// Set the nav first so we can access on the 404 page
store.dispatch(
setNavigation({
isRestaurant: false,
navLinks: genericNavLinks.links,
isOpen: false,
})
);
// Check we have page data
const pageData = pages.find((page) => page.slug === "/");
if (!pageData) return { notFound: true };
return { props: { ...pageData } };
}
);
The NavDrawer component (has the dispatch):
const NavDrawer: React.FC<NavDrawerProps> = ({ testId, id, style }) => {
const { isOpen } = useAppSelector(selectNavigation);
const dispatch = useAppDispatch();
const handleNavClose: React.MouseEventHandler<HTMLButtonElement> = () =>
dispatch(setNavigationOpen(false));
return isOpen ? (
<>
<Underlay onClick={handleNavClose} isActive={true} />
<div
data-testid={testId}
style={style}
className={styles.wrapper}
id={id}
>
<NavDrawerHeader />
<NavLinks />
<NavDrawerFooter />
</div>
</>
) : (
<MobileNavOpenButton />
);
};
The NavLinks component (If I remove the selector from here the warning goes away):
const NavLinks: React.FC<NavLinksProps> = ({ testId, id }) => {
const { navLinks } = useAppSelector(selectNavigation);
return (
<div className={styles.wrapper}>
<ul role="list" data-testid={testId} className={styles.list} id={id}>
{navLinks.map((link) => (
<NavLink key={link.id} link={link} />
))}
</ul>
</div>
);
};
This has been doing my head in for a few days now, any advice?
from react-boilerplate-cra-template.
Related Issues (20)
- The problem with maintainability HOT 6
- 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
- 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
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.