Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Hooks Masonry #50

Open
utterances-bot opened this issue Feb 7, 2020 · 5 comments
Open

React Hooks Masonry #50

utterances-bot opened this issue Feb 7, 2020 · 5 comments
Labels
comments publiuslogic comments

Comments

@utterances-bot
Copy link

React Hooks Masonry | Publiuslogic

React Hooks Masonry

https://publiuslogic.com/

Copy link

cordial commented Feb 7, 2020

hey. Nice work! I was wondering how you would enhance this by having a number of columns value for different breakpoints so that it is more responsive? It is rare you're going to want the same number of columns no matter what the viewport size.

Copy link

cordial commented Feb 7, 2020

Although I guess you can only have more than one masonry grid and hide/display them on viewports as one workaround.

@donaldboulton donaldboulton added comments publiuslogic comments and removed triage labels Feb 7, 2020
@donaldboulton
Copy link
Owner

I am slowly changing from a mess of styled-components and global styles with bulma css and have not quite figured out my columns and breakpoints. Need to do this as bluma does not let me have a sticky TOC in its own column and remain sticky. Your suggestion is perfect for what my confusion is on needed changes are.
That is something very interesting. Changing the number of columns based on breakpoints.
I will work on that and get back to this.
Thank You
Donald Boulton

Copy link

cordial commented Feb 7, 2020

hey again. I'm not sure what I am doing wrong but the number of columns seem to be changing randomly between 1,2,3 upon refreshes?

I had presumed I can change number of cols here? -

' const [numCols, setNumCols] = useState(2)'

Copy link

cordial commented Feb 7, 2020

Are the number of columns supposed to change in reference to minWidth? I'm not sure I've understood your code quite correctly, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comments publiuslogic comments
Projects
None yet
Development

No branches or pull requests

3 participants