Giter VIP home page Giter VIP logo

Comments (11)

markerikson avatar markerikson commented on May 21, 2024

Original author: Ioosth @Ioosth
Original date: 2017-01-12T07:46:52Z

Finnaly!! I was afraid that you forget about it :P
Thank you again!

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original date: 2017-01-12T17:18:08Z

Heh. You're welcome, although I'm not sure what "it" you're referring to :)

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original author: Ioosth @Ioosth
Original date: 2017-01-12T19:56:13Z

Sorry for my poor English! In comments below previous part you said that the sixth part should arrive around Christmas... but Christmas passed, New Year passed... so I was worried that you just abandoned this project. Now I'm happy that it wasn't true!

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original author: Ioosth @Ioosth
Original date: 2017-01-12T20:02:32Z

One thing. Link for "Reselect repo" points to localhost?! ;)

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original date: 2017-01-12T20:06:17Z

Oops, missed that one! I'll fix it this evening.

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original date: 2017-01-12T20:09:24Z

Ah, gotcha. Yeah, I'm aiming for roughly a blog post every two weeks or so. During the Christmas break, I spent time writing the "Idiomatic Redux: Thoughts on Thunks" post, so that took up the next posting slot. After that was done, I resumed work on the Practical Redux series.

If you're interested, I have a list of the blog posts I plan to write here: https://gist.github.com/mar... .

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original author: Richard Hoffmann @richardhoffmann
Original date: 2017-01-20T10:50:53Z

Mark, really... thank you for these awesome series of posts. This seems to be so much effort and is really helpful!

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original date: 2017-01-21T15:58:26Z

Thanks, glad to hear it's helping! Yeah, I've been averaging probably 20+ hours per post in this series. 2-3 evenings of writing the original WIP code, most of a weekend to write the main content of the post (including going back through the "WIP" commits to produce the "final" cleaned-up branch), and another evening to do final editing and insert all the commit/file links.

So yeah, definitely sinking a lot of time into these. Hopefully the final product reflects the effort I'm putting into it, and based on the comments I'm getting, people do seem to think it's worth it :)

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original author: Alexander Levchenko
Original date: 2017-03-13T16:34:25Z

Pleas if it's not very difficult could you explain how to avoid rerendering, with that shallow copy in <pilotslistrow>
pilot = {
...pilotModel.ref
};

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original date: 2017-03-14T03:50:02Z

Actually, as written, the example _doesn't_ avoid re-rendering :) I'm making a new shallow copy of the "real" pilot JS object _every_ time `mapState` is run, so right now it _will_ actually re-render every time an action is dispatched.

There's several ways I could rewrite that `mapState` function to be more optimized and avoid re-rendering. One would be to use memoized selectors - maybe with an input selector that reads the pilot object, and the memoized function that puts together the copy if the input pilot object changes. Another might be to return `pilot` as one field, and `mechType` as a separate prop so that we don't have to create the copy.

Hopefully that helps clarify things. If you've got more questions, let me know!

from marks-dev-blog-comments.

markerikson avatar markerikson commented on May 21, 2024

Original author: Alexander Levchenko
Original date: 2017-03-14T09:04:38Z

Thanks for the answer, I was trying to use memoized selector, but I did it with a simple createSelector. But now I realized that I can use createSelectorCreator and create customSelectorCreator which will use memoize function from lodash for an unbounded cache.
Like this:
import {createSelectorCreator, defaultEqualityCheck} from "reselect";
import memoize from 'lodash/memoize'
const customSelectorCreator = createSelectorCreator(memoize, defaultEqualityCheck);
export const selectPilot = customSelectorCreator(
pilot => pilot,
pilot => ({...pilot})
);

from marks-dev-blog-comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.