friendsofecmascript / reacti18nrouting Goto Github PK
View Code? Open in Web Editor NEW๐ Abstraction layer over React-Router to create i18n routes easily.
Home Page: https://www.npm.im/@foes/react-i18n-routing
License: MIT License
๐ Abstraction layer over React-Router to create i18n routes easily.
Home Page: https://www.npm.im/@foes/react-i18n-routing
License: MIT License
Currently, we only support Yahoo's react-intl
, it's the most popular library to make things work in React around translations. However, there are another good better alternatives like LinguiJs (check out this information if you don't know what library is).
So, the idea behind this issue is to become our library more decoupled from translations libraries allowing the usage of our favorite library.
The history
prop is marked as required in the component's PropTypes. We need to remove this propType check to avoid showing the warning if used in server-side.
I'm trying to configure my app using the basic configuration of ReactI18nRouing
described in https://github.com/FriendsOfECMAScript/ReactI18nRouting/blob/master/docs/basic_usage.md
First I had an issues with running webpack (described here: https://stackoverflow.com/questions/56144968/node-modules-outside-of-the-project-directory-are-not-transpiled-by-babel-7).
Now webpack is generating files properly, but after page refresh I have the following error:
app.jsx:15 Uncaught TypeError: (0 , _reactI18nRouting.defaultUnprefixed) is not a function
at Object../assets/js/app.jsx (app.jsx:15)
at __webpack_require__ (bootstrap:78)
at checkDeferredModules (bootstrap:45)
at Array.webpackJsonpCallback [as push] (bootstrap:32)
at app.js:1
How this can be fixed?
My configuration of webpack / babel was described in the stackoverflow question. The only change that I've done in webpack.config.js
is:
config.module.rules.push({
test: /\.js$/,
include: [/node_modules\/@foes/],
loader: 'babel-loader',
options: {
rootMode: 'upward'
}
});
The code of my app.jsx is just copy-pased from your basic_usage.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.