Comments (8)
👍 for react-router-component (or in general being able to choose a router)
from react-resolver.
If I can figure out how the heck to test out peerDependencies
(and optionalDependencies
), I might be able to get rid of the react-router
requirement!
from react-resolver.
If the react-router
is not used within react-resolver
, why would you then even provide a router as peerDependency
(or optionalDependency
)?
Would it be feasible to create a wrapping/higher-order component (like described in #8) which sets the context
? This component could then be used by a user of react-resolve
to wrap around the App
component.
from react-resolver.
It's a requirement for maintaining contexts when using react-router
:
react-resolver/lib/resolver.js
Line 36 in a6dba11
At the time of inception, this was necessary for server-side rendering with react-router
.
The goal would be, if this remains in, being able to have an optional dependency on it in the consumer project.
I can try replacing this with a wrapping component that's not a route, but I could've sworn I had to use a <Route />
...
from react-resolver.
Oh! But related to #10, I still need to set react
as one of the peerDependencies
, but I can't for the life of me figure out how to confirm this behavior w/o tagging & releasing & testing with a new project!
from react-resolver.
I really like where this project is going.
The goal would be, if this remains in, being able to have an optional dependency on it in the consumer project.
If it's used I suppose its not optional ;-)
As far as I see the <Route />
is basically a wrapper around the outmost (highes level) route handler from the user. The neat thing about extracting the context
initialization in a wrapping component is, that react-resolver can then be used with any router (or none) out of the box.
from react-resolver.
I'll be testing out react-router
's stringent-ness on this :) Hopefully I can warp it in something other than a <Route />
.
from react-resolver.
Not necessary anymore with v1.0.0.
from react-resolver.
Related Issues (20)
- React.renderToStaticMarkup -> ReactDOMServer.renderToStaticMarkup HOT 2
- Can I use this without server rendering? HOT 3
- Add ability to cache resolved props HOT 9
- Using HOC breaks HMR
- Minimum universal react API HOT 1
- test
- Support variable? HOT 3
- Unhandled rejections server side HOT 1
- @context steals data from this.context HOT 6
- Allow factory to decide which props to re-use? HOT 5
- Documentation links are broken HOT 4
- Using same component on different routes HOT 3
- Using @client and @resolve on the same class causes @resolve to be called twice HOT 1
- Some way of manipulating data before passing it to component HOT 2
- Breakage with React 16: PropTypes no longer exported by React HOT 1
- "[email protected]" has incorrect peer dependency "react@^0.14.6 || ^15.0.0-0" HOT 5
- Need hydrate static method in the Resolver class for server side rendering HOT 2
- Fix compatibility with Babel 6
- Resolve multiple props with one callback HOT 5
- Initial Data from Django using React Resolver HOT 1
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-resolver.