Hacker News new | comments | ask | show | jobs | submit login
Bootstrap 4.1.2 released (getbootstrap.com)
113 points by asoto 7 months ago | hide | past | web | favorite | 42 comments

I'm excited for the day this gets merged and can drop jquery:


I'm curious, why?

The only reason my current main work project has jQuery is it uses some Bootstrap components. Everything else is React.

Why not use react-strap? It offers React reimplementations of Bootstrap components.


Reactstrap has a dependency on Bootstrap, which as GP mentioned - uses jQuery.

Actually no it only depends on the bootstrap css and does not require the bootstrap js.

But I'm not sure including react in order to get rid of jQuery is a win haha.

It's not an SPA where everything is React. Some views are React, others aren't, and the main templates still have e.g. Bootstrap dropdown navs.

Congratulations! I adore bootstrap. Huge ecosystem, easy to customize and incorporates so much cross browser “stuff” it’s hard to even imagine. I remember the Fat and MDO days fondly.

Ditto. Bootstrap is such a lifesaver. Thank you!

Has Bootstrap had its day now that we have evergreen browsers and built in layout engines, HTML5 validation plus everything thing else that has arrived in the years since bootstrap 3? Or is this release more of a maintenance product for existing projects? For new projects does it make more sense to leave this framework behind, even though it was brilliant in its day?

Nah, it's not redundant just yet. For starters the components provide a basic sort of 'design' for people who suck at designing UIs, like myself. For them, it means they've got a decent default style for things like buttons, burger menus, slideshows, alerts, etc. That's still useful to have, especially if you can't afford a designer.

It's also still very good for quickly mocking up user interfaces, especially ones for boring stuff like admin panels where you don't want to be stuck focusing on the UI rather than the actual functionality.

Finally, it provides a nice sort of built in style guide for a project you're not used to yet. If a site uses Bootstrap, well you know immediately what classes you need to use for components, what blocks of HTML are needed where, etc, and you can much more easily teach that to a new developer too.

So while its usage for grids is certainly on the decline, it's not dead just yet.

No, it's still incredibly useful. Their components and utilities are just as valuable as the grid system if not more so. As for the grid system, the responsive helpers alone are worth the learning curve there. It's a fantastic project.

I started a small-ish project at work a little while back. We're expanding the functionality a bit now and I made the decision to just re-write the few html pages it has to use Bootstrap (of course I started that this morning with 4.1.1, now there's 4.1.2 out). I really regret not just going with Bootstrap to begin with now. All of the little things that we wrote some quick custom CSS and vanilla JS for are just simply handled. Before today, I haven't touched Bootstrap in probably over a year.

> For new projects does it make more sense to leave this framework behind, even though it was brilliant in its day?

No. It doesn't make sense. Bootstrap has turned into a utility library. What I do is import the SCSS utilities and make my own stylesheet based on boostrap. I usually include the form styles, disable animations, and then use the grid utilities to make more meaningful grids. It's a great foundation for building out your own framework.

Not to mention it's one of the only frameworks I've seen that actually gives a shit about accessibility.

Nahh. Most people still aren't going to write components from scratch.

Even with Bootstrap 4 being based off of Flexbox, there's still lots of convenience classes that people just want to have.

I've moved over to using Vue. I much prefer this version, than using bootstrap-vue.

Is there a vue lib addon where jQuery is replaced with Vue functionality?

I'm using laravel 5.6, which comes with Vue and Bootstrap 4. If I get to a point where my own code isn't using jQuery (very close). I'd like to eliminate that download all together.

I was happy when I found this: https://uiv.wxsm.space/

Bootstrap components implemented in Vue 2, the range of components is limited but I used what I needed and could forgo adding jQuery

Unfortunately the author isn't going to fork and support version 4. He recommends bootstrap-vue.

> https://github.com/wxsms/uiv/issues/157#issuecomment-3622440...

Oh well. I'll keep looking.

Maybe next year, I'll roll up my sleeves and give it a go myself.

i really like the css/scss part of bootstrap for projects. it has everything needed in a high quality and extremly customizable setting. i just wonder why jquery is still there? i would love to see the standard bootsrap with native javascript dom api. this would allow for simple integration into react, angular and whatnot without requiring eachs own project like angular.bootstrap.js and so on...

> i just wonder why jquery is still there?

You may not need it! Go to [1], then click on "Show components requiring JavaScript" to see which components require it. You don't need jQuery for the CSS part of Bootstrap, for example.

[1] http://getbootstrap.com/docs/4.1/getting-started/introductio...

yes of course, you dont need jquery for the javascript part! i wanted to use the bootstrap modal with vue.js. in the end the only way was to use some vue/bootstrap beta library with all the bootstrap components developed for bootstrap...


Maybe try to see if this is complete enough to work.

I agree with you - My guess is jQuery is still around because some portion of the population that uses Bootstrap uses it for the functionality of the dropdowns, buttons, forms etc. that some people would rather use React for.

Yeah, even for a mediocre CSS guy like me, the ability to customize without much pain is very appreciated.

Is there a quick way to migrate from Bootstrap 3 to 4?

There's a migration guide[0]. Having done it this year, it's not too painful, depending on how much you've customized Bootstrap 3 to meet your needs. We've been migrating on a page by page basis, and so usually we wait to migrate a page until our designers come up with an update to the page.


Smart way to do the migration!

If a codebase is already launched with bootstrap 3, what would be benefit of converting? (genuine question)

There's a few refinements in BS4. Refinements that become quickly inavouable. First and foremost the new flexbox directives all grid related stuff (mobile first). That's why I systematically migrate all my projects to BS4 even though it's not 100% needed.

Bootstrap 4 is built with Sass (Bootstrap 3's source code was built with Less). For my team, most of us had been using the Sass version of Bootstrap 3, and we decided to take Bootstrap 4 and create a customized version for our team. That task was made a lot easier with the source code being written in Sass.

In my experience, back when the switch from Bootstrap 2 to 3 happened, a big reason was being able to use sites like StackOverflow for answers.

Over time, all the answers became about Bootstrap 3 and it quickly became difficult to find help about Bootstrap 2.

There's a few transpilers out there but I found them not to work that well when I tried copy pasting some code off of bootsnipp. Specifically, carousels gave me issues.

As far as I was able to find, there doesn't seem to be a straight forward/automated process. Many things have been removed and do not have a 1-1 replacement. If

As far as I was able to find, there doesn't seem to be a straight forward/automated process. Many things have been removed and do not have a 1-1 replacement.

Thank you for this much needed update! Bootstrap has been an amazing tool for years

i like bulma better

is there a css-in-js version of bootstrap?

What do you need Bootstrap for if you can use CSS Grid?

Grids are a very small part of what bootstrap offers

Supporting older browser that don't have CSS Grid?

For various reasons, not everyone is going to have the latest and greatest browser nor is it guaranteed that those browsers will 100% support all the newest features.

Same as it ever was.

What if you can't?

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact