Comments (5)
Not a bad idea. But the slippery slope of configuration might be better avoided.
I chatted with Scott today about this. I'll summarize the key points
The ideal dispatch API should:
- autocomplete
- have a simple API
- throw an error or warning if you dispatch an invalid action
Probably the current API has the most hope and getting all three.
from rematch.
Definitely some cool ideas here! @ShMcK
Perhaps we could provide the flexibility for both. By default, create the action creators on start up, but also have options to change that behavior.
Maybe two options like this:
- A top level option that tells rematch to create all action creators on the fly.
init({ lazyActionCreators: true })
- A model option that tells rematch to only create action creators on the fly for that specific model.
model({
lazyActionCreators: true,
name: 'count',
...
})
from rematch.
Yup yup, agreed. And depending on your IDE, The autocomplete kinda works anyways.
from rematch.
You and your amazing WebStorm.
Anything else you'd like in an action?
from rematch.
haha, yup, WebStorm makes me happy!
Can't think of much else for now. Idea # 2 you mentioned above would be cool though!
So far, my day to day use with mirror is pretty nice, so I'm happy so far with what we have!
from rematch.
Related Issues (20)
- Cannot add property loading, object is not extensible HOT 3
- An argument for 'payload' was not provided. HOT 2
- @rematch/select type error. HOT 8
- Arguments Conflict with TS HOT 7
- TS errors on 2.2.0 HOT 13
- What shall we put as the second generic type of RematchStore<TModels, TExtraModels> HOT 2
- Effects in custom middleware HOT 3
- Type errors when calling effects which utilize rootState without needing a payload HOT 4
- Preserving Rematch.js state between server and client side in Nextjs HOT 1
- @rematch/select typing problem with createSelector() function
- [Typescript] Faulty types HOT 2
- `RematchRootState` second argument default of `Record<string, never>` generates useless state type HOT 1
- @rematch/core has incompatible types with react-redux@8
- TS error while using selectors inside model effects (with plugin like loading) HOT 1
- [Question] Effects in separate files HOT 1
- Conditional types omitted in model effect
- Installation step for @rematch/immer installs immer 10 HOT 2
- [Question] Best practice on call this in reducers and get updated state in effects.
- Effect type inference error on typescript 4.9
- Rematch immer compilation error - (imported as 'produce') was not found HOT 8
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 rematch.