question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Forms won't import at the root

See original GitHub issue

I’m forced to import the Field, Control, and Input (and likely other modules) at react-bulma-components/lib/components/form rather than at react-bulma-components.

This works:

import {
  Columns,
  Heading,
  Box,
  Container,
  Section,
  Button,
  Level,
  Card,
  Media,
  Image,
  Content,
  Tag,
  Message,
  Hero
} from 'react-bulma-components';

import {
  Field,
  Control,
  Input
} from 'react-bulma-components/lib/components/form';

This does not work:

import {
  Columns,
  Heading,
  Box,
  Container,
  Section,
  Button,
  Level,
  Card,
  Media,
  Image,
  Content,
  Tag,
  Message,
  Hero,
  Field,
  Control,
  Input
} from 'react-bulma-components';

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
verheyenkoencommented, Jun 15, 2019

I struggled with this too until I found this ticket. I guess it would be good to note this in the README or in the storybook somehow.

1reaction
coudscommented, Sep 6, 2018

Hi @cereallarceny all the form components are inside the Form component,

you can do this

import { Form } from 'react-bulma-components';

const { Input, Field, Control } = Form;

Also I think I this this should work (didn’t tested yet)

import { Form: { Input, Control } } from 'react-bulma-components'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamics 365 Solution Import Issue – Cannot add root ...
I setup a query on system forms to find my offending form component. buildfetchxml Setting up a Query not available in regular Advanced...
Read more >
Local imports not resolving correctly · Issue #68 - GitHub
I've fixed that hole in the parser. You can't use the form "import .import2". You need to use the form "from . import...
Read more >
Can't bind to 'formGroup' since it isn't a known property of 'form'
To fix this error, you just need to import ReactiveFormsModule from @angular/forms in your module. Here's the example of a basic module with ......
Read more >
How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >
The module name "....." is invalid- 529019 - MSDN - Microsoft
Although the wording may be a bit ambiguous, the message is telling you you can't import a module whose name begins with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found