django-stars / ds-frontend Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
handle router props requires a lot of additional code. we need to review this. as an idea - add some adapters to resource to expand resource functionality
the original resource library (1.x version) has functionality to auto-update store after save/update requests.
we need to re-implement it in 2.0 version.
endpoint: 'content/posts/:postId/tip',
this will not work.
endpoint should be based on props.
UPD: this is works as expected in infinity-list and prefetch resources but is reprodusable in final forms
workaround:
export default withFinalForm(
{
validate,
valuesInterceptor: (values, props) => ({ ...values, postId: props.postId })
},
{
namespace: 'session',
endpoint: 'content/posts/:postId/tip',
},
)
Fo example there is some resource which endpoint depends on passed prop id
:
endpoint: 'some/endpoint/:id/path'
This endpoint will work only once (when using prefetchResources
for example), so that prop id
will be passed to endpoint, but calling resource.fetch()
will cause error, because id
will be undefined.
Fix the logic of building endpoints so that component props will always be passed to it.
I need to make a POST instead of PATCH in the following configuration (in case when props.id is defined)
endpoint: `/posts/:id/like`
connectResource('tokens'')
this should works:
tokens.fetch({ someFilters: 'someValue' })
e.g.
<Link to="posts" search={props.location.search}>Posts</Link>
ideally, the Link component should support all the props of original reat-router Link
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.