Comments (4)
Hi Harry!
Good spot on the readme, fancy submitting a PR?
Im not so sure about swapping the type parameters though, it seems to vary by library whether they are 'T' first or 'Props' first:
- https://github.com/jaredpalmer/formik/blob/master/src/withFormik.tsx#L80
- https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-redux/index.d.ts
- https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/typings/styled-components.d.ts#L94
I plan on releasing 3.0 soon (to coincide with the release of hooks) so now would be the time to swap them.
from use-url-state.
I just meant that when you use react components you normally do something along the lines of class MyComponent extends React.Component<Props, State>
, and so I'd expect to always have props and state in that order. I'm happy to submit a pull request for just the readme though, if you'd prefer
from use-url-state.
If you submit a PR for just the readme that would be great. Still undecided about the type parameter order.
from use-url-state.
I'm inclined to agree with Dean, there isn't really any convention about ordering of generic types for higher order components - there are good arguments for either way here.
I don't think that's a strong enough reason to make a breaking change here, so I think it'd be worth sticking with how it already works.
from use-url-state.
Related Issues (13)
- An in-range update of query-string is breaking the build 🚨 HOT 1
- IE11 "Object doesn't support this action" HOT 7
- Hooks? HOT 3
- Getting "window is not defined" when using custom history on SSR application HOT 1
- Change in v3 - clearing parameters from URL clears them from the state HOT 5
- Clear state from URL when empty/undefined/null HOT 3
- Should it work fine if I'm using HashRouter? HOT 4
- Demo link is broken HOT 1
- Warn the users who have sensitive info in their state HOT 6
- Validation/defaults HOT 3
- Confusion around initialState HOT 2
- Suggestion: Use the state to be pushed instead of what is called by setUrlState 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 use-url-state.